diff mbox series

[7/8] power: supply: max77976_charger: register power supply with devm_power_supply_register()

Message ID 20241005-power-supply-no-wakeup-source-v1-7-1d62bf9bcb1d@weissschuh.net
State New
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/max77976_charger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Luca Ceresoli Oct. 8, 2024, 7:14 a.m. UTC | #1
Hello Thomas,

On Sat, 05 Oct 2024 12:05:09 +0200
Thomas Weißschuh <linux@weissschuh.net> wrote:

> 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>

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
diff mbox series

Patch

diff --git a/drivers/power/supply/max77976_charger.c b/drivers/power/supply/max77976_charger.c
index d7e520da768864f7f7e5177195ec0a16a51724f5..e6fe68cebc32b6fa39df71616ca293ce20098150 100644
--- a/drivers/power/supply/max77976_charger.c
+++ b/drivers/power/supply/max77976_charger.c
@@ -452,6 +452,7 @@  static int max77976_probe(struct i2c_client *client)
 
 	i2c_set_clientdata(client, chg);
 	psy_cfg.drv_data = chg;
+	psy_cfg.no_wakeup_source = true;
 	chg->client = client;
 
 	chg->regmap = devm_regmap_init_i2c(client, &max77976_regmap_config);
@@ -475,7 +476,7 @@  static int max77976_probe(struct i2c_client *client)
 	if (err)
 		return err;
 
-	psy = devm_power_supply_register_no_ws(dev, &max77976_psy_desc, &psy_cfg);
+	psy = devm_power_supply_register(dev, &max77976_psy_desc, &psy_cfg);
 	if (IS_ERR(psy))
 		return dev_err_probe(dev, PTR_ERR(psy), "cannot register\n");