aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-30 16:00:59 -0400
committerMark Brown <broonie@kernel.org>2014-10-31 13:18:35 -0400
commite5adb6cddb17f8e76be404f23a2e0db102ee1bd1 (patch)
tree2c0425b67b43912423cf0b3665ffa4cd9c114a27
parent16af0ee16ca9391ef82e1c74c362d80551e769fe (diff)
ASoC: ad1980: Cleanup printk usage
Use dev_err()/dev_warn() instead of printk(KERN_ERR/KERN_WARNING. 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. Also remove the info message that is printed when the driver is probed, this is just noise in bootlog. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/ad1980.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index cc28dbae8315..5f076c24d062 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -209,7 +209,8 @@ static int ad1980_reset(struct snd_soc_codec *codec, int try_warm)
209 return 0; 209 return 0;
210 } while (retry_cnt++ < 10); 210 } while (retry_cnt++ < 10);
211 211
212 printk(KERN_ERR "AD1980 AC97 reset failed\n"); 212 dev_err(codec->dev, "Failed to reset: AC97 link error\n");
213
213 return -EIO; 214 return -EIO;
214} 215}
215 216
@@ -219,19 +220,15 @@ static int ad1980_soc_probe(struct snd_soc_codec *codec)
219 u16 vendor_id2; 220 u16 vendor_id2;
220 u16 ext_status; 221 u16 ext_status;
221 222
222 printk(KERN_INFO "AD1980 SoC Audio Codec\n");
223
224 ret = snd_soc_new_ac97_codec(codec, soc_ac97_ops, 0); 223 ret = snd_soc_new_ac97_codec(codec, soc_ac97_ops, 0);
225 if (ret < 0) { 224 if (ret < 0) {
226 printk(KERN_ERR "ad1980: failed to register AC97 codec\n"); 225 dev_err(codec->dev, "Failed to register AC97 codec\n");
227 return ret; 226 return ret;
228 } 227 }
229 228
230 ret = ad1980_reset(codec, 0); 229 ret = ad1980_reset(codec, 0);
231 if (ret < 0) { 230 if (ret < 0)
232 printk(KERN_ERR "Failed to reset AD1980: AC97 link error\n");
233 goto reset_err; 231 goto reset_err;
234 }
235 232
236 /* Read out vendor ID to make sure it is ad1980 */ 233 /* Read out vendor ID to make sure it is ad1980 */
237 if (ac97_read(codec, AC97_VENDOR_ID1) != 0x4144) { 234 if (ac97_read(codec, AC97_VENDOR_ID1) != 0x4144) {
@@ -246,9 +243,8 @@ static int ad1980_soc_probe(struct snd_soc_codec *codec)
246 ret = -ENODEV; 243 ret = -ENODEV;
247 goto reset_err; 244 goto reset_err;
248 } else { 245 } else {
249 printk(KERN_WARNING "ad1980: " 246 dev_warn(codec->dev,
250 "Found AD1981 - only 2/2 IN/OUT Channels " 247 "Found AD1981 - only 2/2 IN/OUT Channels supported\n");
251 "supported\n");
252 } 248 }
253 } 249 }
254 250