Re: [PATCH 2/2] power: bq24190_charger: Use PM runtime autosuspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 7, 2017 at 8:01 AM, Tony Lindgren <tony@xxxxxxxxxxx> wrote:
> * Liam Breck <liam@xxxxxxxxxxxxxxxxx> [170203 16:25]:
>> On Fri, Feb 3, 2017 at 1:17 PM, Tony Lindgren <tony@xxxxxxxxxxx> wrote:
>> >  static int bq24190_remove(struct i2c_client *client)
>> >  {
>> >         struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
>> > +       int error;
>> >
>> > -       pm_runtime_get_sync(bdi->dev);
>> > -       bq24190_register_reset(bdi);
>> > -       pm_runtime_put_sync(bdi->dev);
>> > +       error = pm_runtime_get_sync(bdi->dev);
>> > +       if (error < 0) {
>> > +               dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", error);
>> > +               pm_runtime_put_noidle(bdi->dev);
>> > +       }
>> >
>> > +       bq24190_register_reset(bdi);
>> >         bq24190_sysfs_remove_group(bdi);
>> >         power_supply_unregister(bdi->battery);
>> >         power_supply_unregister(bdi->charger);
>> > +       pm_runtime_put_sync(bdi->dev);
>> > +       pm_runtime_dont_use_autosuspend(bdi->dev);
>> >         pm_runtime_disable(bdi->dev);
>>
>> I think you addressed this, but should the above be
>>
>> if (!error)
>>   pm_runtime_put_sync(bdi->dev);
>
> Hmm yeah.. But we need to check for if (error >= 0), also in the other
> places see below.

OK, let's roll v4. it is

Acked-by: Liam Breck <kernel@xxxxxxxxxxxxxxxxx>

(and pls include the v4 in all subjects :-)

I have a patchset for DT support in the works which depends on this one.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux