ARM: OMAP1: Fix pm_idle during suspend

Commit 9ccdac3662 ([ARM] idle:
clean up pm_idle calling, obey hlt_counter) removed a check
for NULL pm_idle.

Replace the NULL assignment in the OMAP1 code with disable_hlt()
to be in sync with the core code and restore the intended behavior.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Nicolas Pitre 2011-12-19 09:11:11 -08:00 committed by Nicolas Pitre
parent dcd6c92267
commit 3c0b2cef91
1 changed files with 2 additions and 5 deletions

View File

@ -583,8 +583,6 @@ static void omap_pm_init_proc(void)
#endif /* DEBUG && CONFIG_PROC_FS */ #endif /* DEBUG && CONFIG_PROC_FS */
static void (*saved_idle)(void) = NULL;
/* /*
* omap_pm_prepare - Do preliminary suspend work. * omap_pm_prepare - Do preliminary suspend work.
* *
@ -592,8 +590,7 @@ static void (*saved_idle)(void) = NULL;
static int omap_pm_prepare(void) static int omap_pm_prepare(void)
{ {
/* We cannot sleep in idle until we have resumed */ /* We cannot sleep in idle until we have resumed */
saved_idle = pm_idle; disable_hlt();
pm_idle = NULL;
return 0; return 0;
} }
@ -630,7 +627,7 @@ static int omap_pm_enter(suspend_state_t state)
static void omap_pm_finish(void) static void omap_pm_finish(void)
{ {
pm_idle = saved_idle; enable_hlt();
} }