diff options
| -rw-r--r-- | drivers/acpi/sleep.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 6bea2fe8434b..2307604064b3 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
| @@ -244,17 +244,10 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
| 244 | { | 244 | { |
| 245 | acpi_status status = AE_OK; | 245 | acpi_status status = AE_OK; |
| 246 | u32 acpi_state = acpi_target_sleep_state; | 246 | u32 acpi_state = acpi_target_sleep_state; |
| 247 | int error; | ||
| 247 | 248 | ||
| 248 | ACPI_FLUSH_CPU_CACHE(); | 249 | ACPI_FLUSH_CPU_CACHE(); |
| 249 | 250 | ||
| 250 | /* Do arch specific saving of state. */ | ||
| 251 | if (acpi_state == ACPI_STATE_S3) { | ||
| 252 | int error = acpi_save_state_mem(); | ||
| 253 | |||
| 254 | if (error) | ||
| 255 | return error; | ||
| 256 | } | ||
| 257 | |||
| 258 | switch (acpi_state) { | 251 | switch (acpi_state) { |
| 259 | case ACPI_STATE_S1: | 252 | case ACPI_STATE_S1: |
| 260 | barrier(); | 253 | barrier(); |
| @@ -262,6 +255,9 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
| 262 | break; | 255 | break; |
| 263 | 256 | ||
| 264 | case ACPI_STATE_S3: | 257 | case ACPI_STATE_S3: |
| 258 | error = acpi_save_state_mem(); | ||
| 259 | if (error) | ||
| 260 | return error; | ||
| 265 | do_suspend_lowlevel(); | 261 | do_suspend_lowlevel(); |
| 266 | pr_info(PREFIX "Low-level resume complete\n"); | 262 | pr_info(PREFIX "Low-level resume complete\n"); |
| 267 | break; | 263 | break; |
