summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-04-07 20:12:53 +0200
committerSebastian Reichel <sre@kernel.org>2019-04-15 22:53:50 +0200
commitffaf6f6773af7d2bad983f43f6ffb4246591a578 (patch)
tree46221c3b848fcc4c753ccaf38dbf5ad97aad6e1b /drivers/power
parentpower: supply: cpcap-battery: Use accumulator for current and power average (diff)
downloadlinux-ffaf6f6773af7d2bad983f43f6ffb4246591a578.tar.xz
linux-ffaf6f6773af7d2bad983f43f6ffb4246591a578.zip
power: supply: cpcap-battery: Fix pointless EPROBE_DEFER warnings
With loadable modules we may get the following during init: could not initialize VBUS or ID IIO: -517 Let's not print any pointless error messages for deferred probe. Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/cpcap-battery.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c
index 2f55a25addee..61d6447d1966 100644
--- a/drivers/power/supply/cpcap-battery.c
+++ b/drivers/power/supply/cpcap-battery.c
@@ -669,8 +669,9 @@ static int cpcap_battery_init_iio(struct cpcap_battery_ddata *ddata)
return 0;
out_err:
- dev_err(ddata->dev, "could not initialize VBUS or ID IIO: %i\n",
- error);
+ if (error != -EPROBE_DEFER)
+ dev_err(ddata->dev, "could not initialize VBUS or ID IIO: %i\n",
+ error);
return error;
}