diff options
author | Sebastian Reichel <sre@kernel.org> | 2023-03-18 01:57:06 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2023-03-29 23:38:57 +0300 |
commit | 4fc1befb3a30d76a3f4b19833d45fb81ab1652b1 (patch) | |
tree | 3fcd7af5c19eacc7a2c2a23ab456f564c6f34506 | |
parent | ca0f6e0d1499e8e23e340d8b7187eeec5c4f6593 (diff) | |
download | linux-4fc1befb3a30d76a3f4b19833d45fb81ab1652b1.tar.xz |
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>
-rw-r--r-- | drivers/power/supply/generic-adc-battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index df1c0a1c6b52..2fa946c93fb4 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -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; |