Skip to content

Commit d3911f1

Browse files
TravMuravsre
authored andcommitted
power: supply: rt5033: Bring back i2c_set_clientdata
Commit 3a93da2 ("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. Fixes: 3a93da2 ("power: supply: rt5033: Use devm_power_supply_register() helper") Tested-by: Raymond Hackley <raymondhackley@protonmail.com> Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20240605-rt5033-null-clientdata-v1-1-558d710eeb4d@trvn.ru Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 1613e60 commit d3911f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/power/supply/rt5033_battery.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static int rt5033_battery_probe(struct i2c_client *client)
159159
return -EINVAL;
160160
}
161161

162+
i2c_set_clientdata(client, battery);
162163
psy_cfg.of_node = client->dev.of_node;
163164
psy_cfg.drv_data = battery;
164165

0 commit comments

Comments
 (0)