ACPI / PM: Introduce __acpi_bus_get_power()
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 24 Nov 2010 23:07:56 +0000 (00:07 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 12 Jan 2011 09:48:44 +0000 (04:48 -0500)
commit5e6d4fe4296782f1f095575b8213a97c3e925a16
tree3d2376b9b18536acfa20777172ab132a475bb0ae
parent30d3df41b32b1ea63d3ebc52ef5644cbe41520f4
ACPI / PM: Introduce __acpi_bus_get_power()

It sometimes is necessary to get the power state of an ACPI device
without updating its device->power.state field, for example to
avoid inconsistencies between device->power.state and the reference
counters of the device's power resources.  For this purpose introduce
__acpi_bus_get_power() that will return the given device's power
state via a pointer (instead of modifying device->power.state)
and make acpi_bus_get_power() use it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/bus.c