ASoC: soc_codec_reg_show use snd_soc_codec_readable_register
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 27 Aug 2011 16:24:14 +0000 (18:24 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 31 Aug 2011 08:47:01 +0000 (09:47 +0100)
Use snd_soc_codec_readable_register instead of open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c

index 4065d4e..fc7fff3 100644 (file)
@@ -143,7 +143,7 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf,
                step = codec->driver->reg_cache_step;
 
        for (i = 0; i < codec->driver->reg_cache_size; i += step) {
-               if (codec->readable_register && !codec->readable_register(codec, i))
+               if (!snd_soc_codec_readable_register(codec, i))
                        continue;
                if (codec->driver->display_register) {
                        count += codec->driver->display_register(codec, buf + count,