Commit 583b53ec authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Sebastian Reichel

power: supply: bq27xxx_battery: Silence deferred-probe error

The driver fails to probe with -EPROBE_DEFER if battery's power supply
(charger driver) isn't ready yet and this results in a bit noisy error
message in KMSG during kernel's boot up. Let's silence the harmless
error message.
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Reviewed-by: default avatarAndrew F. Davis <afd@ti.com>
Reviewed-by: default avatarPali Rohár <pali@kernel.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent e48bbb52
...@@ -1885,7 +1885,10 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di) ...@@ -1885,7 +1885,10 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di)
di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg); di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
if (IS_ERR(di->bat)) { if (IS_ERR(di->bat)) {
dev_err(di->dev, "failed to register battery\n"); if (PTR_ERR(di->bat) == -EPROBE_DEFER)
dev_dbg(di->dev, "failed to register battery, deferring probe\n");
else
dev_err(di->dev, "failed to register battery\n");
return PTR_ERR(di->bat); return PTR_ERR(di->bat);
} }
......
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