All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: rl6347a: Use dev_err for I2C communication error prints
@ 2016-10-07  7:59 Jarkko Nikula
  2016-10-28 17:03 ` Applied "ASoC: rl6347a: Use dev_err for I2C communication error prints" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Nikula @ 2016-10-07  7:59 UTC (permalink / raw)
  To: alsa-devel; +Cc: Oder Chiou, Mark Brown, Jarkko Nikula, Liam Girdwood

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 <jarkko.nikula@linux.intel.com>
---
 sound/soc/codecs/rl6347a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rl6347a.c b/sound/soc/codecs/rl6347a.c
index a4b910efbd45..8f571cf8edd4 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
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-28 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-07  7:59 [PATCH v2] ASoC: rl6347a: Use dev_err for I2C communication error prints Jarkko Nikula
2016-10-28 17:03 ` Applied "ASoC: rl6347a: Use dev_err for I2C communication error prints" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.