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!