AsoC: Make snd_soc_read() and snd_soc_write() functions
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 22 May 2009 08:41:30 +0000 (09:41 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 22 May 2009 09:22:38 +0000 (10:22 +0100)
Should be no impact on the generated code but it helps the compiler
print clearer messages.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h

index 2af3213df90c66a2850ddff7bcd0258640802840..cf6111d72b17015572a131a26c4c7913378adcd0 100644 (file)
@@ -214,10 +214,6 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
                        struct snd_soc_jack_gpio *gpios);
 #endif
 
-/* codec IO */
-#define snd_soc_read(codec, reg) codec->read(codec, reg)
-#define snd_soc_write(codec, reg, value) codec->write(codec, reg, value)
-
 /* codec register bit access */
 int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
                                unsigned short mask, unsigned short value);
@@ -507,6 +503,19 @@ struct soc_enum {
        void *dapm;
 };
 
+/* codec IO */
+static inline unsigned int snd_soc_read(struct snd_soc_codec *codec,
+                                       unsigned int reg)
+{
+       return codec->read(codec, reg);
+}
+
+static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
+                                        unsigned int reg, unsigned int val)
+{
+       return codec->write(codec, reg, val);
+}
+
 #include <sound/soc-dai.h>
 
 #endif