Skip to content

Commit 8c3985b

Browse files
t-8chsre
authored andcommitted
power: supply: acer_a500_battery: register power supply with devm_power_supply_register()
devm_power_supply_register_no_ws() is going to be removed. Switch to the general registration API. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-3-1d62bf9bcb1d@weissschuh.net Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 2de244e commit 8c3985b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/power/supply/acer_a500_battery.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,15 @@ static int a500_battery_probe(struct platform_device *pdev)
233233

234234
psy_cfg.of_node = pdev->dev.parent->of_node;
235235
psy_cfg.drv_data = bat;
236+
psy_cfg.no_wakeup_source = true;
236237

237238
bat->regmap = dev_get_regmap(pdev->dev.parent, "KB930");
238239
if (!bat->regmap)
239240
return -EINVAL;
240241

241-
bat->psy = devm_power_supply_register_no_ws(&pdev->dev,
242-
&a500_battery_desc,
243-
&psy_cfg);
242+
bat->psy = devm_power_supply_register(&pdev->dev,
243+
&a500_battery_desc,
244+
&psy_cfg);
244245
if (IS_ERR(bat->psy))
245246
return dev_err_probe(&pdev->dev, PTR_ERR(bat->psy),
246247
"failed to register battery\n");

0 commit comments

Comments
 (0)