diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-11-25 00:09:15 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-12 04:48:45 -0500 |
commit | 25eed40720fc9005c63a1f436e5f8a78836c26ff (patch) | |
tree | 2c927e50d57c2e456d9ceaa575c1bb774627ee10 /include/acpi/acpi_bus.h | |
parent | ade3e7fef794781c0798d0cf0f046123842ba550 (diff) | |
download | linux-3.10-25eed40720fc9005c63a1f436e5f8a78836c26ff.tar.gz linux-3.10-25eed40720fc9005c63a1f436e5f8a78836c26ff.tar.bz2 linux-3.10-25eed40720fc9005c63a1f436e5f8a78836c26ff.zip |
ACPI / PM: Add function for updating device power state consistently
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: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r-- | include/acpi/acpi_bus.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 359ef11725a..5d2c4c54006 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -330,6 +330,7 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle, int acpi_bus_get_status(struct acpi_device *device); int acpi_bus_get_power(acpi_handle handle, int *state); int acpi_bus_set_power(acpi_handle handle, int state); +int acpi_bus_update_power(acpi_handle handle, int *state_p); bool acpi_bus_power_manageable(acpi_handle handle); bool acpi_bus_can_wakeup(acpi_handle handle); #ifdef CONFIG_ACPI_PROC_EVENT |