mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Andrew F . Davis" <afd@ti.com>, "Chris Lapa" <chris@lapa.com.au>,
	"Matt Ranostay" <mranostay@gmail.com>
Subject: Re: [PATCH 2/5] power: supply: bq27xxx: Register power supply with devm
Date: Sun, 07 May 2017 19:43:10 +0200	[thread overview]
Message-ID: <1494178990.13734.2.camel@paulk.fr> (raw)
In-Reply-To: <20170501105537.3ghbjcxxychxm52n@earth>

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]

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@paulk.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/

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-05-07 22:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 18:27 [PATCH 1/5] power: supply: bq27xxx: Pass of_node along to allow device-tree supply Paul Kocialkowski
2017-04-30 18:27 ` [PATCH 2/5] power: supply: bq27xxx: Register power supply with devm Paul Kocialkowski
2017-05-01 10:55   ` Sebastian Reichel
2017-05-07 17:43     ` Paul Kocialkowski [this message]
2017-04-30 18:27 ` [PATCH 3/5] power: supply: bq27xxx: Rename work structure member to poll_work Paul Kocialkowski
2017-04-30 18:27 ` [PATCH 4/5] power: supply: bq27xxx: Look for status change on external power change Paul Kocialkowski
2017-05-05  8:04   ` Pali Rohár
2017-05-07 17:37     ` Paul Kocialkowski
2017-05-08 13:04       ` Pali Rohár
2017-04-30 18:27 ` [PATCH 5/5] power: supply: bq27xxx: Correct supply status with current draw Paul Kocialkowski
2017-05-28 19:16   ` Pavel Machek
2017-05-31 16:55     ` Paul Kocialkowski
2017-05-31 17:32       ` Pavel Machek
2017-05-31 19:28         ` Paul Kocialkowski
2017-06-07  7:15           ` Paul Kocialkowski
2017-06-07  7:52             ` Pavel Machek
2017-06-07 15:20               ` Paul Kocialkowski
2017-06-07 19:50                 ` Pavel Machek
2017-06-08 10:08                   ` Paul Kocialkowski
2017-06-08 19:27                     ` Sebastian Reichel
2017-06-09  6:16                       ` Paul Kocialkowski
2017-06-13 12:14                         ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494178990.13734.2.camel@paulk.fr \
    --to=contact@paulk.fr \
    --cc=afd@ti.com \
    --cc=chris@lapa.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mranostay@gmail.com \
    --cc=pali.rohar@gmail.com \
    --cc=sebastian.reichel@collabora.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®