* [PATCH] power: supply: rt5033: Bring back i2c_set_clientdata
@ 2024-06-05 13:53 Nikita Travkin
2024-06-05 22:17 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Nikita Travkin @ 2024-06-05 13:53 UTC (permalink / raw)
To: Sebastian Reichel, Andrew Davis
Cc: Sebastian Reichel, linux-pm, linux-kernel, Raymond Hackley,
Nikita Travkin
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.
Fixes: 3a93da231c12 ("power: supply: rt5033: Use devm_power_supply_register() helper")
Tested-by: Raymond Hackley <raymondhackley@protonmail.com>
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
drivers/power/supply/rt5033_battery.c | 1 +
1 file changed, 1 insertion(+)
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;
---
base-commit: 234cb065ad82915ff8d06ce01e01c3e640b674d2
change-id: 20240605-rt5033-null-clientdata-3743d68d504a
Best regards,
--
Nikita Travkin <nikita@trvn.ru>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] power: supply: rt5033: Bring back i2c_set_clientdata
2024-06-05 13:53 [PATCH] power: supply: rt5033: Bring back i2c_set_clientdata Nikita Travkin
@ 2024-06-05 22:17 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2024-06-05 22:17 UTC (permalink / raw)
To: Sebastian Reichel, Andrew Davis, Nikita Travkin
Cc: linux-pm, linux-kernel, Raymond Hackley
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,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-05 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 13:53 [PATCH] power: supply: rt5033: Bring back i2c_set_clientdata Nikita Travkin
2024-06-05 22:17 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox