diff options
author | Tony Luck <tony.luck@intel.com> | 2005-07-13 15:15:43 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-07-13 15:15:43 -0400 |
commit | 99ad25a313bda566a346b46a6015afa65bc0a02b (patch) | |
tree | b9443fed1ab74f320c4ee0791864ee96d7c069df /drivers/acpi/bus.c | |
parent | f62c4a96f74d6c6dd56d1742697e94a5c2085e87 (diff) | |
parent | 9a556e89081b0c1c2f83cee915363b15a68a6f2d (diff) |
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'drivers/acpi/bus.c')
-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); |