diff options
| -rw-r--r-- | arch/arm/mach-lpc32xx/pm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/mach-lpc32xx/pm.c b/arch/arm/mach-lpc32xx/pm.c index 5a4d31488d11..32bca351a73b 100644 --- a/arch/arm/mach-lpc32xx/pm.c +++ b/arch/arm/mach-lpc32xx/pm.c | |||
| @@ -86,14 +86,11 @@ static int lpc32xx_pm_enter(suspend_state_t state) | |||
| 86 | void *iram_swap_area; | 86 | void *iram_swap_area; |
| 87 | 87 | ||
| 88 | /* Allocate some space for temporary IRAM storage */ | 88 | /* Allocate some space for temporary IRAM storage */ |
| 89 | iram_swap_area = kmalloc(lpc32xx_sys_suspend_sz, GFP_KERNEL); | 89 | iram_swap_area = kmemdup((void *)TEMP_IRAM_AREA, |
| 90 | lpc32xx_sys_suspend_sz, GFP_KERNEL); | ||
| 90 | if (!iram_swap_area) | 91 | if (!iram_swap_area) |
| 91 | return -ENOMEM; | 92 | return -ENOMEM; |
| 92 | 93 | ||
| 93 | /* Backup a small area of IRAM used for the suspend code */ | ||
| 94 | memcpy(iram_swap_area, (void *) TEMP_IRAM_AREA, | ||
| 95 | lpc32xx_sys_suspend_sz); | ||
| 96 | |||
| 97 | /* | 94 | /* |
| 98 | * Copy code to suspend system into IRAM. The suspend code | 95 | * Copy code to suspend system into IRAM. The suspend code |
| 99 | * needs to run from IRAM as DRAM may no longer be available | 96 | * needs to run from IRAM as DRAM may no longer be available |
