Skip to content

Commit

Permalink
ASoC: stac9766: Cleanup printk usage
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Oct 31, 2014
1 parent 4c07a43 commit 93932ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/stac9766.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static int stac9766_codec_resume(struct snd_soc_codec *codec)
/* give the codec an AC97 warm reset to start the link */
reset:
if (reset > 5) {
printk(KERN_ERR "stac9766 failed to resume");
dev_err(codec->dev, "Failed to resume\n");
return -EIO;
}
codec->ac97->bus->ops->warm_reset(codec->ac97);
Expand Down Expand Up @@ -338,7 +338,7 @@ static int stac9766_codec_probe(struct snd_soc_codec *codec)
stac9766_reset(codec, 0);
ret = stac9766_reset(codec, 1);
if (ret < 0) {
printk(KERN_ERR "Failed to reset STAC9766: AC97 link error\n");
dev_err(codec->dev, "Failed to reset: AC97 link error\n");
goto codec_err;
}

Expand Down

0 comments on commit 93932ab

Please sign in to comment.