diff mbox series

[4/8] power: supply: bq27xxx_battery: register power supply with power_supply_register()

Message ID 20241005-power-supply-no-wakeup-source-v1-4-1d62bf9bcb1d@weissschuh.net
State Accepted
Commit 1011646d4bd6c2eedb68d131ba7ddaf9ecd2aa9e
Headers show
Series power: supply: core: remove {,devm_}power_supply_register_no_ws() | expand

Commit Message

Thomas Weißschuh Oct. 5, 2024, 10:05 a.m. UTC
devm_power_supply_register_no_ws() is going to be removed.
Switch to the general registration API.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 drivers/power/supply/bq27xxx_battery.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 750fda543308c873f65ef3600546b086af68fafd..e47556ec3cfeadd6ce014559d90807b293d781d5 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -2131,6 +2131,7 @@  int bq27xxx_battery_setup(struct bq27xxx_device_info *di)
 	struct power_supply_config psy_cfg = {
 		.of_node = di->dev->of_node,
 		.drv_data = di,
+		.no_wakeup_source = true,
 	};
 	int ret;
 
@@ -2157,7 +2158,7 @@  int bq27xxx_battery_setup(struct bq27xxx_device_info *di)
 	psy_desc->get_property = bq27xxx_battery_get_property;
 	psy_desc->external_power_changed = bq27xxx_external_power_changed;
 
-	di->bat = devm_power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
+	di->bat = devm_power_supply_register(di->dev, psy_desc, &psy_cfg);
 	if (IS_ERR(di->bat))
 		return dev_err_probe(di->dev, PTR_ERR(di->bat),
 				     "failed to register battery\n");