summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2008-08-11 08:55:05 +0200
committerLen Brown <len.brown@intel.com>2008-10-22 23:58:00 +0200
commita51e145f379ae48003129610922595893e8efde0 (patch)
treeb3294f55421628124709d846ebdc2efbbbc7ca11 /drivers/acpi/scan.c
parentACPI: replace AE_BAD_ADDRESS exception code with AE_ERROR (diff)
downloadlinux-a51e145f379ae48003129610922595893e8efde0.tar.xz
linux-a51e145f379ae48003129610922595893e8efde0.zip
ACPI: Get the device power state in the course of scanning device
Get the device power state in the course of scanning device if the device power flag is power_managable. i.e. The device has the _PSx/_PRx object. At the same time before the drivers/acpi/power module is loaded, there is no relation between acpi_power_resource and acpi device. So the first parameter of acpi_power_get_state is changed to acpi_handle. http://bugzilla.kernel.org/show_bug.cgi?id=8049 http://bugzilla.kernel.org/show_bug.cgi?id=11000 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/acpi/scan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f6f52c1a2aba..308ddb1c207c 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -807,6 +807,7 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
/* TBD: System wake support and resource requirements. */
device->power.state = ACPI_STATE_UNKNOWN;
+ acpi_bus_get_power(device->handle, &(device->power.state));
return 0;
}