]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
ACPI / PM: Add function for updating device power state consistently
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 24 Nov 2010 23:09:15 +0000 (00:09 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 12 Jan 2011 09:48:45 +0000 (04:48 -0500)
commit25eed40720fc9005c63a1f436e5f8a78836c26ff
tree2c927e50d57c2e456d9ceaa575c1bb774627ee10
parentade3e7fef794781c0798d0cf0f046123842ba550
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>
drivers/acpi/bus.c
include/acpi/acpi_bus.h