aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-06-15 21:36:11 -0400
committerLen Brown <len.brown@intel.com>2006-06-15 21:36:11 -0400
commit8f2ddb37e564a9616c05fa0d5652e0049072a730 (patch)
treea28df8762bb77979b0ff8cc14cfcc12a1204ca09 /drivers/acpi/bus.c
parent5b542e4422766d644ca303b8a47b27ec9eeeef3a (diff)
parent74ce1468128e299fe6a85e7e78e528e45e72d6d9 (diff)
Pull bugzilla-5000 into release branch
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index b77f03d51f0b..dd3983cece92 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -205,12 +205,14 @@ int acpi_bus_set_power(acpi_handle handle, int state)
205 * Get device's current power state if it's unknown 205 * Get device's current power state if it's unknown
206 * This means device power state isn't initialized or previous setting failed 206 * This means device power state isn't initialized or previous setting failed
207 */ 207 */
208 if (device->power.state == ACPI_STATE_UNKNOWN) 208 if (!device->flags.force_power_state) {
209 acpi_bus_get_power(device->handle, &device->power.state); 209 if (device->power.state == ACPI_STATE_UNKNOWN)
210 if (state == device->power.state) { 210 acpi_bus_get_power(device->handle, &device->power.state);
211 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", 211 if (state == device->power.state) {
212 state)); 212 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n",
213 return_VALUE(0); 213 state));
214 return_VALUE(0);
215 }
214 } 216 }
215 if (!device->power.states[state].flags.valid) { 217 if (!device->power.states[state].flags.valid) {
216 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n", 218 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n",