diff options
Diffstat (limited to 'arch/arm/plat-s3c/pm-check.c')
-rw-r--r-- | arch/arm/plat-s3c/pm-check.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c/pm-check.c b/arch/arm/plat-s3c/pm-check.c index 183f1304bf58..39f2555564da 100644 --- a/arch/arm/plat-s3c/pm-check.c +++ b/arch/arm/plat-s3c/pm-check.c | |||
@@ -222,9 +222,21 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) | |||
222 | */ | 222 | */ |
223 | void s3c_pm_check_restore(void) | 223 | void s3c_pm_check_restore(void) |
224 | { | 224 | { |
225 | if (crcs != NULL) { | 225 | if (crcs != NULL) |
226 | s3c_pm_run_sysram(s3c_pm_runcheck, crcs); | 226 | s3c_pm_run_sysram(s3c_pm_runcheck, crcs); |
227 | kfree(crcs); | ||
228 | crcs = NULL; | ||
229 | } | ||
230 | } | 227 | } |
228 | |||
229 | /** | ||
230 | * s3c_pm_check_cleanup() - free memory resources | ||
231 | * | ||
232 | * Free the resources that where allocated by the suspend | ||
233 | * memory check code. We do this separately from the | ||
234 | * s3c_pm_check_restore() function as we cannot call any | ||
235 | * functions that might sleep during that resume. | ||
236 | */ | ||
237 | void s3c_pm_check_cleanup(void) | ||
238 | { | ||
239 | kfree(crcs); | ||
240 | crcs = NULL; | ||
241 | } | ||
242 | |||