diff mbox

[2/4] ARM: use new LEDS CPU trigger stub to replace old one

Message ID 1309039804-659-3-git-send-email-bryan.wu@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bryan Wu June 25, 2011, 10:10 p.m. UTC
Cc:  Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
---
 arch/arm/kernel/process.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Linus Walleij June 26, 2011, 11:08 a.m. UTC | #1
Hi Bryan, notice that this:

2011/6/26 Bryan Wu <bryan.wu@canonical.com>:

> -               leds_event(led_idle_start);
> +               ledtrig_cpu(CPU_LED_IDLE_START);
(...)
> -               leds_event(led_idle_end);
> +               ledtrig_cpu(CPU_LED_IDLE_END);

That breaks all the old users of the CPU activity LEDs.

I only fixed up RealView and Versatile!

grep -r led_idle_start arch/arm/

Gives you a hint that you also have to retire custom LEDs from
orion, omap, at91, footbridge, sa1100, ks8695, shark, clps711x,
pxa and omap1.

You have to write a patch each an every one of these, and
since they all are already using that mechanism actively
you need to select the LED trigger in their Kconfig.

Thanks,
Linus Walleij
Bryan Wu June 27, 2011, 6 a.m. UTC | #2
On Sun, Jun 26, 2011 at 7:08 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> Hi Bryan, notice that this:
>
> 2011/6/26 Bryan Wu <bryan.wu@canonical.com>:
>
>> -               leds_event(led_idle_start);
>> +               ledtrig_cpu(CPU_LED_IDLE_START);
> (...)
>> -               leds_event(led_idle_end);
>> +               ledtrig_cpu(CPU_LED_IDLE_END);
>
> That breaks all the old users of the CPU activity LEDs.
>
> I only fixed up RealView and Versatile!
>
> grep -r led_idle_start arch/arm/
>
> Gives you a hint that you also have to retire custom LEDs from
> orion, omap, at91, footbridge, sa1100, ks8695, shark, clps711x,
> pxa and omap1.
>
> You have to write a patch each an every one of these, and
> since they all are already using that mechanism actively
> you need to select the LED trigger in their Kconfig.
>

No problem, I will clean them up soon.

Thanks,
diff mbox

Patch

diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 5e1e541..d3b70cc 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -30,9 +30,9 @@ 
 #include <linux/uaccess.h>
 #include <linux/random.h>
 #include <linux/hw_breakpoint.h>
+#include <linux/leds.h>
 
 #include <asm/cacheflush.h>
-#include <asm/leds.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/thread_notify.h>
@@ -183,7 +183,7 @@  void cpu_idle(void)
 	/* endless idle loop with no priority at all */
 	while (1) {
 		tick_nohz_stop_sched_tick(1);
-		leds_event(led_idle_start);
+		ledtrig_cpu(CPU_LED_IDLE_START);
 		while (!need_resched()) {
 #ifdef CONFIG_HOTPLUG_CPU
 			if (cpu_is_offline(smp_processor_id()))
@@ -207,7 +207,7 @@  void cpu_idle(void)
 				local_irq_enable();
 			}
 		}
-		leds_event(led_idle_end);
+		ledtrig_cpu(CPU_LED_IDLE_END);
 		tick_nohz_restart_sched_tick();
 		preempt_enable_no_resched();
 		schedule();