Skip to content

Commit

Permalink
ARM: OMAP1: Fix pm_idle during suspend
Browse files Browse the repository at this point in the history
Commit 9ccdac3 ([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>
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Jan 20, 2012
1 parent dcd6c92 commit 3c0b2ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/arm/mach-omap1/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,17 +583,14 @@ static void omap_pm_init_proc(void)

#endif /* DEBUG && CONFIG_PROC_FS */

static void (*saved_idle)(void) = NULL;

/*
* omap_pm_prepare - Do preliminary suspend work.
*
*/
static int omap_pm_prepare(void)
{
/* We cannot sleep in idle until we have resumed */
saved_idle = pm_idle;
pm_idle = NULL;
disable_hlt();

return 0;
}
Expand Down Expand Up @@ -630,7 +627,7 @@ static int omap_pm_enter(suspend_state_t state)

static void omap_pm_finish(void)
{
pm_idle = saved_idle;
enable_hlt();
}


Expand Down

0 comments on commit 3c0b2ce

Please sign in to comment.