diff options
author | Len Brown <len.brown@intel.com> | 2007-02-17 04:11:50 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-17 04:11:50 +0100 |
commit | 08e4a10ec82faf5ba67c8d0115b7bc9e58071555 (patch) | |
tree | be31751f933ea26d8e7edb592a19584c3ff50679 /drivers/acpi/bus.c | |
parent | Pull bugzilla-7200 into release branch (diff) | |
parent | ACPI: fix fan after resume from S3 (diff) | |
download | linux-08e4a10ec82faf5ba67c8d0115b7bc9e58071555.tar.xz linux-08e4a10ec82faf5ba67c8d0115b7bc9e58071555.zip |
Pull bugzilla-7570 into release branch
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index fd37e19360d0..0c93cd400ddb 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -199,15 +199,14 @@ int acpi_bus_set_power(acpi_handle handle, int state) * Get device's current power state if it's unknown * This means device power state isn't initialized or previous setting failed */ - if (!device->flags.force_power_state) { - if (device->power.state == ACPI_STATE_UNKNOWN) - acpi_bus_get_power(device->handle, &device->power.state); - if (state == device->power.state) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", - state)); - return 0; - } + if ((device->power.state == ACPI_STATE_UNKNOWN) || device->flags.force_power_state) + acpi_bus_get_power(device->handle, &device->power.state); + if ((state == device->power.state) && !device->flags.force_power_state) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", + state)); + return 0; } + if (!device->power.states[state].flags.valid) { printk(KERN_WARNING PREFIX "Device does not support D%d\n", state); return -ENODEV; |