Skip to content

Commit 4fc1bef

Browse files
committed
power: supply: generic-adc-battery: improve error message
Add device context and error code to the error messages to make it useful. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
1 parent ca0f6e0 commit 4fc1bef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/power/supply/generic-adc-battery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int read_channel(struct gab *adc_bat, enum gab_chan_type channel,
9292

9393
ret = iio_read_channel_processed(adc_bat->channel[channel], result);
9494
if (ret < 0)
95-
pr_err("read channel error\n");
95+
dev_err(&adc_bat->psy->dev, "read channel error: %d\n", ret);
9696
else
9797
*result *= 1000;
9898

0 commit comments

Comments
 (0)