===================================================================
@@ -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);
}
}