diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2007-10-22 10:19:09 (GMT) |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-10-25 20:31:31 (GMT) |
commit | c35923bc558074d4f5e6f9706e4cb9811ae55775 (patch) | |
tree | 562d2a16fac0bf72b5126f9d79e6d1765038692f /drivers/acpi/bus.c | |
parent | 95b937e3f52a7f5546c4bffe29886fe400bad1d1 (diff) | |
download | linux-c35923bc558074d4f5e6f9706e4cb9811ae55775.tar.xz |
ACPI: power: don't cache power resource state
ACPI may change power resource state behind our back, so don't
keep our local copy, which may not be valid.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index fb2cff9..fdee82d 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -198,11 +198,9 @@ int acpi_bus_set_power(acpi_handle handle, int state) return -ENODEV; } /* - * Get device's current power state if it's unknown - * This means device power state isn't initialized or previous setting failed + * Get device's current power state */ - if ((device->power.state == ACPI_STATE_UNKNOWN) || device->flags.force_power_state) - acpi_bus_get_power(device->handle, &device->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)); |