summaryrefslogtreecommitdiff
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-11-25 02:08:36 +0300
committerLen Brown <len.brown@intel.com>2011-01-12 12:48:44 +0300
commitade3e7fef794781c0798d0cf0f046123842ba550 (patch)
treeda022d17787e9b79012fae0fabf6e7bf612b3edd /drivers/acpi/scan.c
parent5e6d4fe4296782f1f095575b8213a97c3e925a16 (diff)
downloadlinux-ade3e7fef794781c0798d0cf0f046123842ba550.tar.xz
ACPI / PM: Add function for device power state initialization
Add function acpi_bus_init_power() for getting the initial power state of an ACPI device and reference counting its power resources as appropriate. Make acpi_bus_get_power_flags() use the new function instead of acpi_bus_get_power() that updates device->power.state without reference counting the device's power resources. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 29ef505c487b..ef8e659771e1 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -901,10 +901,7 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
device->power.states[ACPI_STATE_D3].flags.valid = 1;
device->power.states[ACPI_STATE_D3].power = 0;
- /* TBD: System wake support and resource requirements. */
-
- device->power.state = ACPI_STATE_UNKNOWN;
- acpi_bus_get_power(device->handle, &(device->power.state));
+ acpi_bus_init_power(device);
return 0;
}