Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162916AbdD3S3E (ORCPT ); Sun, 30 Apr 2017 14:29:04 -0400 Received: from gagarine.paulk.fr ([109.190.93.129]:58646 "EHLO gagarine.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969127AbdD3S2q (ORCPT ); Sun, 30 Apr 2017 14:28:46 -0400 From: Paul Kocialkowski To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= , "Andrew F . Davis" , Sebastian Reichel , Chris Lapa , Matt Ranostay , Paul Kocialkowski Subject: [PATCH 2/5] power: supply: bq27xxx: Register power supply with devm Date: Sun, 30 Apr 2017 20:27:24 +0200 Message-Id: <20170430182727.24412-2-contact@paulk.fr> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170430182727.24412-1-contact@paulk.fr> References: <20170430182727.24412-1-contact@paulk.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 23 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 --- 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