Commit 4fc1befb authored by Sebastian Reichel's avatar Sebastian Reichel

power: supply: generic-adc-battery: improve error message

Add device context and error code to the error messages to make it
useful.
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarMatti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent ca0f6e0d
......@@ -92,7 +92,7 @@ static int read_channel(struct gab *adc_bat, enum gab_chan_type channel,
ret = iio_read_channel_processed(adc_bat->channel[channel], result);
if (ret < 0)
pr_err("read channel error\n");
dev_err(&adc_bat->psy->dev, "read channel error: %d\n", ret);
else
*result *= 1000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment