diff options
author | David Shaohua Li <shaohua.li@intel.com> | 2005-03-19 00:16:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-11 23:47:06 -0400 |
commit | b913100d7304ea9596d8d85ab5f3ae04bd2b0ddb (patch) | |
tree | 270925a02dd83264fd5bd3a47fc39453798c39d5 /drivers/acpi | |
parent | 0f64474b8f7f1f7f3af5b24ef997baa35f923509 (diff) |
[ACPI] pci_set_power_state() now calls
platform_pci_set_power_state()
and ACPI can answer
http://bugzilla.kernel.org/show_bug.cgi?id=4277
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bus.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 4edff1738579..d77c2307883c 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -212,6 +212,12 @@ acpi_bus_set_power ( | |||
212 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device is not power manageable\n")); | 212 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device is not power manageable\n")); |
213 | return_VALUE(-ENODEV); | 213 | return_VALUE(-ENODEV); |
214 | } | 214 | } |
215 | /* | ||
216 | * Get device's current power state if it's unknown | ||
217 | * This means device power state isn't initialized or previous setting failed | ||
218 | */ | ||
219 | if (device->power.state == ACPI_STATE_UNKNOWN) | ||
220 | acpi_bus_get_power(device->handle, &device->power.state); | ||
215 | if (state == device->power.state) { | 221 | if (state == device->power.state) { |
216 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", state)); | 222 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", state)); |
217 | return_VALUE(0); | 223 | return_VALUE(0); |
@@ -231,7 +237,7 @@ acpi_bus_set_power ( | |||
231 | * On transitions to a high-powered state we first apply power (via | 237 | * On transitions to a high-powered state we first apply power (via |
232 | * power resources) then evalute _PSx. Conversly for transitions to | 238 | * power resources) then evalute _PSx. Conversly for transitions to |
233 | * a lower-powered state. | 239 | * a lower-powered state. |
234 | */ | 240 | */ |
235 | if (state < device->power.state) { | 241 | if (state < device->power.state) { |
236 | if (device->power.flags.power_resources) { | 242 | if (device->power.flags.power_resources) { |
237 | result = acpi_power_transition(device, state); | 243 | result = acpi_power_transition(device, state); |