diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-07-06 18:28:35 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-06 18:28:35 -0400 |
commit | e96c4b081df0991a57b244f68c3955a9ea00bd0a (patch) | |
tree | eeeb0110bd4ffdf814db88f68ef2a81e45fab55d /drivers | |
parent | 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff) |
ACPI / Sleep: Free NVS copy if suspending of devices fails
If suspending of devices fails or system suspend is tested in the
"devices" mode, the memory allocated for storing a copy of the ACPI
NVS area will not be freed, because acpi_pm_finish() is not called
in that case. Fix this by moving the suspend_nvs_free() call to
acpi_pm_end().
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/sleep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 5b7c52e4a00f..da68ed24f4c5 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -145,7 +145,6 @@ static void acpi_pm_finish(void) | |||
145 | { | 145 | { |
146 | u32 acpi_state = acpi_target_sleep_state; | 146 | u32 acpi_state = acpi_target_sleep_state; |
147 | 147 | ||
148 | suspend_nvs_free(); | ||
149 | acpi_ec_unblock_transactions(); | 148 | acpi_ec_unblock_transactions(); |
150 | 149 | ||
151 | if (acpi_state == ACPI_STATE_S0) | 150 | if (acpi_state == ACPI_STATE_S0) |
@@ -167,6 +166,7 @@ static void acpi_pm_finish(void) | |||
167 | */ | 166 | */ |
168 | static void acpi_pm_end(void) | 167 | static void acpi_pm_end(void) |
169 | { | 168 | { |
169 | suspend_nvs_free(); | ||
170 | /* | 170 | /* |
171 | * This is necessary in case acpi_pm_finish() is not called during a | 171 | * This is necessary in case acpi_pm_finish() is not called during a |
172 | * failing transition to a sleep state. | 172 | * failing transition to a sleep state. |