Re: [PATCH v2 2/3] ACPI / PM: Introduce concept of a _PR0 dependent device

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

 



On Wed, Jun 19, 2019 at 03:20:45PM +0200, Rafael J. Wysocki wrote:
> > +int acpi_device_power_add_dependent(struct acpi_device *adev,
> > +                                   struct device *dev)
> > +{
> > +       struct acpi_power_resource_entry *entry;
> > +       struct list_head *resources;
> > +       int ret;
> > +
> > +       if (!adev->power.flags.power_resources)
> > +               return 0;
> > +       if (!adev->power.states[ACPI_STATE_D0].flags.valid)
> > +               return 0;
> 
> The two checks above can be replaced with an
> adev->flags.power_manageable one AFAICS (the "valid" flag is always
> set for D0 and the list below will be empty if there are no power
> resources).
> 
> Same for acpi_device_power_remove_dependent(), of course.

OK, I'll do that in next version.

> Apart from this LGTM.

Thanks!



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux