Message ID | 20240605-rt5033-null-clientdata-v1-1-558d710eeb4d@trvn.ru (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | power: supply: rt5033: Bring back i2c_set_clientdata | expand |
On Wed, 05 Jun 2024 18:53:27 +0500, Nikita Travkin wrote: > Commit 3a93da231c12 ("power: supply: rt5033: Use devm_power_supply_register() helper") > reworked the driver to use devm. While at it, the i2c_set_clientdata > was dropped along with the remove callback. Unfortunately other parts > of the driver also rely on i2c clientdata so this causes kernel oops. > > Bring the call back to fix the driver. > > [...] Applied, thanks! [1/1] power: supply: rt5033: Bring back i2c_set_clientdata commit: d3911f1639e67fc7b12aae0efa5a540976d7443b Best regards,
diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c index 32eafe2c00af..7a27b262fb84 100644 --- a/drivers/power/supply/rt5033_battery.c +++ b/drivers/power/supply/rt5033_battery.c @@ -159,6 +159,7 @@ static int rt5033_battery_probe(struct i2c_client *client) return -EINVAL; } + i2c_set_clientdata(client, battery); psy_cfg.of_node = client->dev.of_node; psy_cfg.drv_data = battery;