diff mbox

commit 9630bdd9 changes behavior of the poweroff - bug?

Message ID 201004130101.54117.rjw@sisk.pl (mailing list archive)
State New, archived
Headers show

Commit Message

Rafael Wysocki April 12, 2010, 11:01 p.m. UTC
None
diff mbox

Patch

Index: linux-2.6/drivers/acpi/wakeup.c
===================================================================
--- linux-2.6.orig/drivers/acpi/wakeup.c
+++ linux-2.6/drivers/acpi/wakeup.c
@@ -63,17 +63,17 @@  void acpi_enable_wakeup_device(u8 sleep_
 	list_for_each_safe(node, next, &acpi_wakeup_device_list) {
 		struct acpi_device *dev =
 			container_of(node, struct acpi_device, wakeup_list);
+		u8 action = ACPI_GPE_ENABLE;
 
 		if (!dev->wakeup.flags.valid)
 			continue;
 
 		if ((!dev->wakeup.state.enabled && !dev->wakeup.prepare_count)
 		    || sleep_state > (u32) dev->wakeup.sleep_state)
-			continue;
+			action = ACPI_GPE_DISABLE;
 
-		/* The wake-up power should have been enabled already. */
 		acpi_set_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number,
-				ACPI_GPE_ENABLE);
+				action);
 	}
 }