Pull misc into release branch
[linux-2.6.git] / drivers / acpi / sleep / main.c
index 56afb1c1a494b2040c3f26b65df4d8c2ed8a6272..3279e72a94f81c0c532f72a9bd0284861a1ba345 100644 (file)
@@ -212,10 +212,26 @@ static void acpi_hibernation_finish(void)
        acpi_set_firmware_waking_vector((acpi_physical_address) 0);
 }
 
+static int acpi_hibernation_pre_restore(void)
+{
+       acpi_status status;
+
+       status = acpi_hw_disable_all_gpes();
+
+       return ACPI_SUCCESS(status) ? 0 : -EFAULT;
+}
+
+static void acpi_hibernation_restore_cleanup(void)
+{
+       acpi_hw_enable_all_runtime_gpes();
+}
+
 static struct hibernation_ops acpi_hibernation_ops = {
        .prepare = acpi_hibernation_prepare,
        .enter = acpi_hibernation_enter,
        .finish = acpi_hibernation_finish,
+       .pre_restore = acpi_hibernation_pre_restore,
+       .restore_cleanup = acpi_hibernation_restore_cleanup,
 };
 #endif                         /* CONFIG_SOFTWARE_SUSPEND */