ASoC: Push snd_soc_write() and snd_soc_read() into the source file
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 1 Nov 2010 19:41:57 +0000 (15:41 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Nov 2010 17:41:53 +0000 (13:41 -0400)
Facilitating adding trace type stuff. For a first pass add some dev_dbg()
statements into them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
include/sound/soc.h
sound/soc/soc-core.c

index 5c3bce83f28ad1be248a35c89d190dcb1504c36e..aaf34d7cd95e98daa69427036f6ddefaba018484 100644 (file)
@@ -639,17 +639,9 @@ struct soc_enum {
 };
 
 /* codec IO */
-static inline unsigned int snd_soc_read(struct snd_soc_codec *codec,
-                                       unsigned int reg)
-{
-       return codec->driver->read(codec, reg);
-}
-
-static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
-                                        unsigned int reg, unsigned int val)
-{
-       return codec->driver->write(codec, reg, val);
-}
+unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
+unsigned int snd_soc_write(struct snd_soc_codec *codec,
+                          unsigned int reg, unsigned int val);
 
 /* device driver data */
 
index 614a8b30d87bdefdb99414f06d1d74438e60cd18..4360436ef035cb40d6f8702db20f519dc3a59377 100644 (file)
@@ -1877,6 +1877,25 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec)
 }
 EXPORT_SYMBOL_GPL(snd_soc_free_ac97_codec);
 
+unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg)
+{
+       unsigned int ret;
+
+       ret = codec->driver->read(codec, reg);
+       dev_dbg(codec->dev, "read %x => %x\n", reg, ret);
+
+       return ret;
+}
+EXPORT_SYMBOL_GPL(snd_soc_read);
+
+unsigned int snd_soc_write(struct snd_soc_codec *codec,
+                          unsigned int reg, unsigned int val)
+{
+       dev_dbg(codec->dev, "write %x = %x\n", reg, val);
+       return codec->driver->write(codec, reg, val);
+}
+EXPORT_SYMBOL_GPL(snd_soc_write);
+
 /**
  * snd_soc_update_bits - update codec register bits
  * @codec: audio codec