CPU LED trigger: add hooks to generic code so that it works on x86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CPU LED trigger hooks are currently hidden in arm-specific code, which
means that this trigger only works on arm. Add it to the generic
code, so that it works on x86, too.

Signed-off-by: Pavel Machek <pavel@xxxxxx>

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index fefcb1f..087acd6 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -8,6 +8,7 @@
 #include <linux/mm.h>
 #include <linux/stackprotector.h>
 #include <linux/suspend.h>
+#include <linux/leds.h>
 
 #include <asm/tlb.h>
 
@@ -232,6 +233,7 @@ static void cpu_idle_loop(void)
 			}
 
 			local_irq_disable();
+			ledtrig_cpu(CPU_LED_IDLE_START);
 			arch_cpu_idle_enter();
 
 			/*
@@ -249,6 +251,7 @@ static void cpu_idle_loop(void)
 				cpuidle_idle_call();
 
 			arch_cpu_idle_exit();
+			ledtrig_cpu(CPU_LED_IDLE_END);
 		}
 
 		/*

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux