• Rafael J. Wysocki's avatar
    ACPI / PM: Add function for updating device power state consistently · 25eed407
    Rafael J. Wysocki authored
    Add function acpi_bus_update_power() for reading the actual power
    state of an ACPI device and updating its device->power.state field
    in such a way that its power resources' reference counters will
    remain consistent with that field.
    
    For this purpose introduce __acpi_bus_set_power() setting the
    power state of an ACPI device without updating its
    device->power.state field and make acpi_bus_set_power() and
    acpi_bus_update_power() use it (acpi_bus_set_power() retains the
    current behavior for now).
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    25eed407
acpi_bus.h 11.4 KB