aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKonstantin Karasyov <konstantin.a.karasyov@intel.com>2007-02-21 02:05:58 -0500
committerLen Brown <len.brown@intel.com>2007-02-21 02:05:58 -0500
commit7292576043666ff39946dee14641fe719ba8c7e8 (patch)
tree65e21f949797169d7c2bee2b0794627ffb0407a7 /drivers
parent255f0385c8e0d6b9005c0e09fffb5bd852f3b506 (diff)
ACPI: fix S3 fan resume issue
http://bugzilla.kernel.org/show_bug.cgi?id=7570#c14 Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/power.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 1ef338545dfe..547eee7537bc 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -436,8 +436,6 @@ int acpi_power_transition(struct acpi_device *device, int state)
436 cl = &device->power.states[device->power.state].resources; 436 cl = &device->power.states[device->power.state].resources;
437 tl = &device->power.states[state].resources; 437 tl = &device->power.states[state].resources;
438 438
439 device->power.state = ACPI_STATE_UNKNOWN;
440
441 if (!cl->count && !tl->count) { 439 if (!cl->count && !tl->count) {
442 result = -ENODEV; 440 result = -ENODEV;
443 goto end; 441 goto end;
@@ -468,12 +466,15 @@ int acpi_power_transition(struct acpi_device *device, int state)
468 goto end; 466 goto end;
469 } 467 }
470 468
471 /* We shouldn't change the state till all above operations succeed */ 469 end:
472 device->power.state = state; 470 if (result) {
473 end: 471 device->power.state = ACPI_STATE_UNKNOWN;
474 if (result)
475 printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n", 472 printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n",
476 device->pnp.bus_id, state); 473 device->pnp.bus_id, state);
474 } else {
475 /* We shouldn't change the state till all above operations succeed */
476 device->power.state = state;
477 }
477 478
478 return result; 479 return result;
479} 480}