aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel/idle.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-09-19 17:46:07 +0300
committerPekka Enberg <penberg@kernel.org>2011-09-19 17:46:07 +0300
commitd20bbfab01802e195a50435940f7e4aa747c217c (patch)
tree82b0007e33c083050a4e60a49dbb2f5477b4c99d /arch/sh/kernel/idle.c
parenta37933c37c14b64e81c7c9cc44a5d3f5e0c91412 (diff)
parent136333d104bd3a62d783b0ac3d0f32ac0108c5d0 (diff)
Merge branch 'slab/urgent' into slab/next
Diffstat (limited to 'arch/sh/kernel/idle.c')
-rw-r--r--arch/sh/kernel/idle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index 84db0d6ccd0..32114e0941a 100644
--- a/arch/sh/kernel/idle.c
+++ b/arch/sh/kernel/idle.c
@@ -16,12 +16,13 @@
#include <linux/thread_info.h>
#include <linux/irqflags.h>
#include <linux/smp.h>
+#include <linux/cpuidle.h>
#include <asm/pgalloc.h>
#include <asm/system.h>
#include <linux/atomic.h>
#include <asm/smp.h>
-void (*pm_idle)(void) = NULL;
+static void (*pm_idle)(void);
static int hlt_counter;
@@ -100,7 +101,8 @@ void cpu_idle(void)
local_irq_disable();
/* Don't trace irqs off for idle */
stop_critical_timings();
- pm_idle();
+ if (cpuidle_idle_call())
+ pm_idle();
/*
* Sanity check to ensure that pm_idle() returns
* with IRQs enabled