patch-2.4.0-test2 linux/arch/arm/kernel/time.c

Next file: linux/arch/arm/lib/changebit.S
Previous file: linux/arch/arm/kernel/signal.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/arch/arm/kernel/time.c linux/arch/arm/kernel/time.c
@@ -154,21 +154,29 @@
 
 static void do_leds(void)
 {
-	static unsigned int count = 50;
-	static int last_pid;
+#ifdef CONFIG_LEDS_CPU
+	{
+		static int last_pid;
 
-	if (current->pid != last_pid) {
-		last_pid = current->pid;
-		if (last_pid)
-			leds_event(led_idle_end);
-		else
-			leds_event(led_idle_start);
+		if (current->pid != last_pid) {
+			last_pid = current->pid;
+			if (last_pid)
+				leds_event(led_idle_end);
+			else
+				leds_event(led_idle_start);
+		}
 	}
-		
-	if (--count == 0) {
-		count = 50;
-		leds_event(led_timer);
+#endif
+#ifdef CONFIG_LEDS_TIMER
+	{
+		static unsigned int count = 50;
+
+		if (--count == 0) {
+			count = 50;
+			leds_event(led_timer);
+		}
 	}
+#endif
 }
 #else
 #define do_leds()

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)