From: Jarkko Nikula Date: Fri, 7 Oct 2016 07:59:51 +0000 (+0300) Subject: ASoC: rl6347a: Use dev_err for I2C communication error prints X-Git-Tag: v5.15~12278^2~3^2~6^3~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b058b176dd26546bcef8f8b774f1542b2907af5f;p=platform%2Fkernel%2Flinux-starfive.git ASoC: rl6347a: Use dev_err for I2C communication error prints It's difficult to guess from bunch of "ret=-121" errors what driver and device actually caused them. Since struct i2c_client has the dev pointer use that for dev_err() with meaningful error message. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rl6347a.c b/sound/soc/codecs/rl6347a.c index a4b910e..8f571cf 100644 --- a/sound/soc/codecs/rl6347a.c +++ b/sound/soc/codecs/rl6347a.c @@ -51,7 +51,7 @@ int rl6347a_hw_write(void *context, unsigned int reg, unsigned int value) if (ret == 4) return 0; else - pr_err("ret=%d\n", ret); + dev_err(&client->dev, "I2C error %d\n", ret); if (ret < 0) return ret; else