aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2007-10-22 06:19:09 -0400
committerLen Brown <len.brown@intel.com>2007-10-25 16:31:31 -0400
commitc35923bc558074d4f5e6f9706e4cb9811ae55775 (patch)
tree562d2a16fac0bf72b5126f9d79e6d1765038692f /drivers/acpi/bus.c
parent95b937e3f52a7f5546c4bffe29886fe400bad1d1 (diff)
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index fb2cff9a2d24..fdee82d37b7d 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)
198 return -ENODEV; 198 return -ENODEV;
199 } 199 }
200 /* 200 /*
201 * Get device's current power state if it's unknown 201 * Get device's current power state
202 * This means device power state isn't initialized or previous setting failed
203 */ 202 */
204 if ((device->power.state == ACPI_STATE_UNKNOWN) || device->flags.force_power_state) 203 acpi_bus_get_power(device->handle, &device->power.state);
205 acpi_bus_get_power(device->handle, &device->power.state);
206 if ((state == device->power.state) && !device->flags.force_power_state) { 204 if ((state == device->power.state) && !device->flags.force_power_state) {
207 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", 205 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n",
208 state)); 206 state));