diff options
Diffstat (limited to 'drivers/acpi/sleep/main.c')
-rw-r--r-- | drivers/acpi/sleep/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index bc7e16ec8393..42127c0d612c 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -217,10 +217,26 @@ static void acpi_hibernation_finish(void) | |||
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | static int acpi_hibernation_pre_restore(void) | ||
221 | { | ||
222 | acpi_status status; | ||
223 | |||
224 | status = acpi_hw_disable_all_gpes(); | ||
225 | |||
226 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; | ||
227 | } | ||
228 | |||
229 | static void acpi_hibernation_restore_cleanup(void) | ||
230 | { | ||
231 | acpi_hw_enable_all_runtime_gpes(); | ||
232 | } | ||
233 | |||
220 | static struct hibernation_ops acpi_hibernation_ops = { | 234 | static struct hibernation_ops acpi_hibernation_ops = { |
221 | .prepare = acpi_hibernation_prepare, | 235 | .prepare = acpi_hibernation_prepare, |
222 | .enter = acpi_hibernation_enter, | 236 | .enter = acpi_hibernation_enter, |
223 | .finish = acpi_hibernation_finish, | 237 | .finish = acpi_hibernation_finish, |
238 | .pre_restore = acpi_hibernation_pre_restore, | ||
239 | .restore_cleanup = acpi_hibernation_restore_cleanup, | ||
224 | }; | 240 | }; |
225 | #endif /* CONFIG_SOFTWARE_SUSPEND */ | 241 | #endif /* CONFIG_SOFTWARE_SUSPEND */ |
226 | 242 | ||