summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2011-01-26 05:04:00 +0800
committerEric Miao <eric.y.miao@gmail.com>2011-02-09 23:05:03 +0800
commit3d9cb0eafd024d6fc1b1583ff9b17e5f60951fd9 (patch)
tree54bd0d074df77b0783623e9f705d5285f5e5b4bb /arch
parent57834a722473848338b1967f7fdd9907c713b0a7 (diff)
ARM: pxa: only save/restore registers when pm functions are defined
Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/pm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 978e1b289544..1807c9abdde0 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -33,7 +33,7 @@ int pxa_pm_enter(suspend_state_t state)
#endif
/* skip registers saving for standby */
- if (state != PM_SUSPEND_STANDBY) {
+ if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->save) {
pxa_cpu_pm_fns->save(sleep_save);
/* before sleeping, calculate and save a checksum */
for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++)
@@ -44,7 +44,7 @@ int pxa_pm_enter(suspend_state_t state)
pxa_cpu_pm_fns->enter(state);
cpu_init();
- if (state != PM_SUSPEND_STANDBY) {
+ if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->restore) {
/* after sleeping, validate the checksum */
for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++)
checksum += sleep_save[i];