Skip to content

Commit

Permalink
ARM: pxa: only save/restore registers when pm functions are defined
Browse files Browse the repository at this point in the history
Reported-and-tested-by: Sven Neumann <[email protected]>
Signed-off-by: Eric Miao <[email protected]>
  • Loading branch information
ericmiao committed Feb 9, 2011
1 parent 57834a7 commit 3d9cb0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand All @@ -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];
Expand Down

0 comments on commit 3d9cb0e

Please sign in to comment.