diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-11 14:36:25 +0100 | 
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-11 14:36:25 +0100 | 
| commit | a8931ef380c92d121ae74ecfb03b2d63f72eea6f (patch) | |
| tree | 980fb6b019e11e6cb1ece55b7faff184721a8053 /arch/arm/mach-pxa/pm.c | |
| parent | 90574d0a4d4b73308ae54a2a57a4f3f1fa98e984 (diff) | |
| parent | e5a5816f7875207cb0a0a7032e39a4686c5e10a4 (diff) | |
| download | olio-linux-3.10-a8931ef380c92d121ae74ecfb03b2d63f72eea6f.tar.xz olio-linux-3.10-a8931ef380c92d121ae74ecfb03b2d63f72eea6f.zip  | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/arm/mach-pxa/pm.c')
| -rw-r--r-- | arch/arm/mach-pxa/pm.c | 10 | 
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index ec1bbf333a3..7d4debbdcca 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c @@ -42,20 +42,17 @@ int pxa_pm_enter(suspend_state_t state)  	if (state != PM_SUSPEND_STANDBY) {  		pxa_cpu_pm_fns->save(sleep_save);  		/* before sleeping, calculate and save a checksum */ -		for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++) +		for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++)  			sleep_save_checksum += sleep_save[i];  	} -	/* Clear reset status */ -	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; -  	/* *** go zzz *** */  	pxa_cpu_pm_fns->enter(state);  	cpu_init();  	if (state != PM_SUSPEND_STANDBY) {  		/* after sleeping, validate the checksum */ -		for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++) +		for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++)  			checksum += sleep_save[i];  		/* if invalid, display message and wait for a hardware reset */ @@ -101,7 +98,8 @@ static int __init pxa_pm_init(void)  		return -EINVAL;  	} -	sleep_save = kmalloc(pxa_cpu_pm_fns->save_size, GFP_KERNEL); +	sleep_save = kmalloc(pxa_cpu_pm_fns->save_count * sizeof(unsigned long), +			     GFP_KERNEL);  	if (!sleep_save) {  		printk(KERN_ERR "failed to alloc memory for pm save\n");  		return -ENOMEM;  |