[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170430182727.24412-2-contact@paulk.fr>
Date: Sun, 30 Apr 2017 20:27:24 +0200
From: Paul Kocialkowski <contact@...lk.fr>
To: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Pali Rohár <pali.rohar@...il.com>,
"Andrew F . Davis" <afd@...com>,
Sebastian Reichel <sre@...nel.org>,
Chris Lapa <chris@...a.com.au>,
Matt Ranostay <mranostay@...il.com>,
Paul Kocialkowski <contact@...lk.fr>
Subject: [PATCH 2/5] power: supply: bq27xxx: Register power supply with devm
This uses the managed devices resources version of the
power_supply_register_no_ws function to register the power supply.
Signed-off-by: Paul Kocialkowski <contact@...lk.fr>
---
drivers/power/supply/bq27xxx_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 6ef95442a918..be476e0bc85d 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1371,7 +1371,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 = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
+ di->bat = devm_power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
if (IS_ERR(di->bat)) {
dev_err(di->dev, "failed to register battery\n");
return PTR_ERR(di->bat);
--
2.12.2
Powered by blists - more mailing lists