lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1494178990.13734.2.camel@paulk.fr>
Date:   Sun, 07 May 2017 19:43:10 +0200
From:   Paul Kocialkowski <contact@...lk.fr>
To:     Sebastian Reichel <sebastian.reichel@...labora.co.uk>
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Pali Rohár <pali.rohar@...il.com>,
        "Andrew F . Davis" <afd@...com>, Chris Lapa <chris@...a.com.au>,
        Matt Ranostay <mranostay@...il.com>
Subject: Re: [PATCH 2/5] power: supply: bq27xxx: Register power supply with
 devm

Le lundi 01 mai 2017 à 12:55 +0200, Sebastian Reichel a écrit :
> Hi,
> 
> On Sun, Apr 30, 2017 at 08:27:24PM +0200, Paul Kocialkowski wrote:
> > 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);
> 
> That does not make sense if bq27xxx_battery_teardown() still calls
> power_supply_unregister().

That's a very good point, thanks! Will fix in v2.

-- 
Paul Kocialkowski, developer of free digital technology and hardware support

Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ