mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
power: supply: cw2015: use dev_err_probe to allow deferred probe
Deal with deferred probe using dev_err_probe so the error is handled
and avoid logging lots probe defer information like the following:
[ 9.125121] cw2015 4-0062: Failed to register power supply
[ 9.211131] cw2015 4-0062: Failed to register power supply
Fixes: b4c7715c10
("power: supply: add CellWise cw2015 fuel gauge driver")
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
56d629af09
commit
ad1abe4769
@ -679,7 +679,9 @@ static int cw_bat_probe(struct i2c_client *client)
|
||||
&cw2015_bat_desc,
|
||||
&psy_cfg);
|
||||
if (IS_ERR(cw_bat->rk_bat)) {
|
||||
dev_err(cw_bat->dev, "Failed to register power supply\n");
|
||||
/* try again if this happens */
|
||||
dev_err_probe(&client->dev, PTR_ERR(cw_bat->rk_bat),
|
||||
"Failed to register power supply\n");
|
||||
return PTR_ERR(cw_bat->rk_bat);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user