diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-05-28 16:32:14 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-10 11:02:34 -0400 |
commit | dd4c4f17d722ffeb2515bf781400675a30fcead7 (patch) | |
tree | 0190eff340ffeac7800a3d7d1e0c1232c09397ef /drivers/acpi/sleep.c | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
suspend: Move NVS save/restore code to generic suspend functionality
Saving platform non-volatile state may be required for suspend to RAM as
well as hibernation. Move it to more generic code.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 4ab2275b4461..bcaa6efa8136 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -393,7 +393,7 @@ static int acpi_hibernation_begin(void) { int error; - error = s4_no_nvs ? 0 : hibernate_nvs_alloc(); + error = s4_no_nvs ? 0 : suspend_nvs_alloc(); if (!error) { acpi_target_sleep_state = ACPI_STATE_S4; acpi_sleep_tts_switch(acpi_target_sleep_state); @@ -407,7 +407,7 @@ static int acpi_hibernation_pre_snapshot(void) int error = acpi_pm_prepare(); if (!error) - hibernate_nvs_save(); + suspend_nvs_save(); return error; } @@ -432,7 +432,7 @@ static int acpi_hibernation_enter(void) static void acpi_hibernation_finish(void) { - hibernate_nvs_free(); + suspend_nvs_free(); acpi_pm_finish(); } @@ -452,7 +452,7 @@ static void acpi_hibernation_leave(void) panic("ACPI S4 hardware signature mismatch"); } /* Restore the NVS memory area */ - hibernate_nvs_restore(); + suspend_nvs_restore(); } static int acpi_pm_pre_restore(void) @@ -501,7 +501,7 @@ static int acpi_hibernation_begin_old(void) if (!error) { if (!s4_no_nvs) - error = hibernate_nvs_alloc(); + error = suspend_nvs_alloc(); if (!error) acpi_target_sleep_state = ACPI_STATE_S4; } @@ -513,7 +513,7 @@ static int acpi_hibernation_pre_snapshot_old(void) int error = acpi_pm_disable_gpes(); if (!error) - hibernate_nvs_save(); + suspend_nvs_save(); return error; } |