summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-30 21:01:03 +0100
committerMark Brown <broonie@kernel.org>2014-10-31 17:31:16 +0000
commit9cf766f666cc4518e22f185159f285f4e3183230 (patch)
tree340c04956a8ee6287d5f3cd73cba790d5247032b
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
downloadlinux-stable-9cf766f666cc4518e22f185159f285f4e3183230.tar.gz
linux-stable-9cf766f666cc4518e22f185159f285f4e3183230.tar.bz2
linux-stable-9cf766f666cc4518e22f185159f285f4e3183230.zip
ASoC: wm9705: Cleanup printk usage
Use dev_err() instead of printk(KERN_ERR. This is common practice and makes it easy to find out which device generated the message. While we are at it also align the error messages with the other AC'97 drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm9705.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c
index c0b7f45dfa37..355b28dd6ac9 100644
--- a/sound/soc/codecs/wm9705.c
+++ b/sound/soc/codecs/wm9705.c
@@ -300,6 +300,8 @@ static int wm9705_reset(struct snd_soc_codec *codec)
return 0; /* Success */
}
+ dev_err(codec->dev, "Failed to reset: AC97 link error\n");
+
return -EIO;
}
@@ -317,10 +319,8 @@ static int wm9705_soc_resume(struct snd_soc_codec *codec)
u16 *cache = codec->reg_cache;
ret = wm9705_reset(codec);
- if (ret < 0) {
- printk(KERN_ERR "could not reset AC97 codec\n");
+ if (ret < 0)
return ret;
- }
for (i = 2; i < ARRAY_SIZE(wm9705_reg) << 1; i += 2) {
soc_ac97_ops->write(codec->ac97, i, cache[i>>1]);
@@ -339,7 +339,7 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec)
ret = snd_soc_new_ac97_codec(codec, soc_ac97_ops, 0);
if (ret < 0) {
- printk(KERN_ERR "wm9705: failed to register AC97 codec\n");
+ dev_err(codec->dev, "Failed to register AC97 codec\n");
return ret;
}