diff options
author | Konstantin Karasyov <konstantin.a.karasyov@intel.com> | 2007-02-16 02:23:07 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-16 02:23:07 -0500 |
commit | b1028c545ced13590dd9a9a8086543aef26c7187 (patch) | |
tree | c02123c234525697bae75e3817ca663ea787cbfb /drivers/acpi/bus.c | |
parent | 724339d76d9407cd1a8ad32a9c1fdf64840cc51b (diff) | |
download | blackbird-op-linux-b1028c545ced13590dd9a9a8086543aef26c7187.tar.gz blackbird-op-linux-b1028c545ced13590dd9a9a8086543aef26c7187.zip |
ACPI: fix fan after resume from S3
http://bugzilla.kernel.org/show_bug.cgi?id=7570
Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
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 c26468da4295..be9a878557c7 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; |