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] [day] [month] [year] [list]
Date:	Thu, 24 Sep 2015 17:55:35 +0200
From:	Enric Balletbo Serra <eballetbo@...il.com>
To:	Sebastian Reichel <sre@...nel.org>
Cc:	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Tony Lindgren <tony@...mide.com>, sameo@...ux.intel.com,
	Lee Jones <lee.jones@...aro.org>,
	Sjoerd Simons <sjoerd.simons@...labora.co.uk>,
	Javier Martinez Canillas <javier@...hile0.org>
Subject: Re: [PATCHv2 2/2] power_supply: Add support for tps65217-charger.

Hi,

2015-09-24 17:45 GMT+02:00 Sebastian Reichel <sre@...nel.org>:
> Hi,
>
> On Thu, Sep 24, 2015 at 09:23:25AM +0200, Enric Balletbo i Serra wrote:
>> This patch adds support for the tps65217 charger driver. This driver is
>> responsible for controlling the charger aspect of the tps65217 mfd.
>> Currently, this mainly consists of turning on and off the charger, but
>> some other features of the charger can be supported through this driver.
>>
>> [...]
>>
>> +static int tps65217_ac_get_property(struct power_supply *psy,
>> +                     enum power_supply_property psp,
>> +                     union power_supply_propval *val)
>> +{
>> +     struct tps65217_charger *charger = power_supply_get_drvdata(psy);
>> +
>> +     if (psp == POWER_SUPPLY_PROP_ONLINE) {
>> +             val->intval = charger->ac_online;
>> +             charger->prev_ac_online = charger->ac_online;
>
> I think this is no longer needed at this place.
>
Right, as I moved ...

>> +             return 0;
>> +     }
>> +     return -EINVAL;
>> +}
>>
>> [...]
>>
>> +static int tps65217_charger_remove(struct platform_device *pdev)
>> +{
>> +     struct tps65217_charger *charger = platform_get_drvdata(pdev);
>> +
>> +     kthread_stop(charger->poll_task);
>> +
>> +     power_supply_unregister(charger->ac);
>
> This is not needed with devm_power_supply_register() and actually
> it's wrong, since it would be called again by managed resources
> infrastructure.
>

Yes I missed this unregister. I'll send v3

Thanks,
Enric

>> +     return 0;
>> +}
>
> -- Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ