summaryrefslogtreecommitdiff
path: root/packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch')
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch57
1 files changed, 30 insertions, 27 deletions
diff --git a/packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch b/packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch
index b6b3897005..92b03836d4 100644
--- a/packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch
+++ b/packages/linux/ixp4xx-kernel/2.6.16/951-ixp4xx-leds-cpu-activity.patch
@@ -6,18 +6,25 @@ are idle.
Signed-off-by: John Bowler <jbowler@acm.org>
-diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/arch/arm/kernel/process.c linux-2.6.15.2/arch/arm/kernel/process.c
---- linux-2.6.15/arch/arm/kernel/process.c 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.15/arch/arm/kernel/process.c 1970-01-01 00:00:00.000000000 +0000
+---
+ arch/arm/kernel/process.c | 11
+ drivers/leds/Kconfig | 9
+ drivers/leds/Makefile | 1
+ drivers/leds/ledtrig-cpu.c | 501 +++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/leds.h | 9
+ 5 files changed, 531 insertions(+)
+
+--- linux-ixp4xx.orig/arch/arm/kernel/process.c 2006-02-21 00:53:28.000000000 +0100
++++ linux-ixp4xx/arch/arm/kernel/process.c 2006-02-21 01:03:33.000000000 +0100
@@ -27,6 +27,7 @@
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/cpu.h>
+#include <linux/leds.h>
- #include <asm/system.h>
- #include <asm/io.h>
-@@ -81,6 +82,12 @@ void (*pm_power_off)(void);
+ #include <asm/leds.h>
+ #include <asm/processor.h>
+@@ -80,6 +81,12 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
/*
@@ -30,7 +37,7 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/arch/arm/kernel/
* This is our default idle handler. We need to disable
* interrupts here to ensure we don't miss a wakeup call.
*/
-@@ -121,8 +128,12 @@ void cpu_idle(void)
+@@ -120,8 +127,12 @@ void cpu_idle(void)
if (!idle)
idle = default_idle;
leds_event(led_idle_start);
@@ -43,9 +50,8 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/arch/arm/kernel/
leds_event(led_idle_end);
preempt_enable_no_resched();
schedule();
-diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/Kconfig linux-2.6.15.2/drivers/leds/Kconfig
---- linux-2.6.15/drivers/leds/Kconfig 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.15/drivers/leds/Kconfig 1970-01-01 00:00:00.000000000 +0000
+--- linux-ixp4xx.orig/drivers/leds/Kconfig 2006-02-21 00:58:36.000000000 +0100
++++ linux-ixp4xx/drivers/leds/Kconfig 2006-02-21 01:03:33.000000000 +0100
@@ -66,5 +66,14 @@ config LEDS_TRIGGER_TIMER
This allows LEDs to be controlled by a programmable timer
via sysfs. If unsure, say Y.
@@ -61,17 +67,15 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/Kco
+
endmenu
-diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/Makefile linux-2.6.15.2/drivers/leds/Makefile
---- linux-2.6.15/drivers/leds/Makefile 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.15/drivers/leds/Makefile 1970-01-01 00:00:00.000000000 +0000
+--- linux-ixp4xx.orig/drivers/leds/Makefile 2006-02-21 00:58:36.000000000 +0100
++++ linux-ixp4xx/drivers/leds/Makefile 2006-02-21 01:03:33.000000000 +0100
@@ -13,3 +13,4 @@ obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o
# LED Triggers
obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+obj-$(CONFIG_LEDS_TRIGGER_CPU_ACTIVITY) += ledtrig-cpu.o
-diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/ledtrig-cpu.c linux-2.6.15.2/drivers/leds/ledtrig-cpu.c
---- linux-2.6.15/drivers/leds/ledtrig-cpu.c 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.15/drivers/leds/ledtrig-cpu.c 1970-01-01 00:00:00.000000000 +0000
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-ixp4xx/drivers/leds/ledtrig-cpu.c 2006-02-21 01:08:57.000000000 +0100
@@ -0,0 +1,501 @@
+/*
+ * LEDs CPU activity trigger
@@ -182,7 +186,7 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+ * have changed. Returns true if the LED is blinking. The argument
+ * is the blink state - the brightness of the blinking LED.
+ */
-+static int leds_cpu_trigger_led_state_change(struct led_device *led,
++static int leds_cpu_trigger_led_state_change(struct led_classdev *led,
+ int is_active, enum led_brightness brightness)
+{
+ int is_blinking = 0;
@@ -218,7 +222,7 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+static ssize_t leds_cpu_trigger_show_prop(struct class_device *dev, char *buf,
+ size_t where)
+{
-+ struct led_device *led = dev->class_data;
++ struct led_classdev *led = dev->class_data;
+ cpu_trigger_led_state item = cpu_led_invalid, i;
+ char *next;
+
@@ -270,7 +274,7 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+{
+ size_t rc = 0;
+ cpu_trigger_led_state value = 0/*sic*/;
-+ struct led_device *led;
++ struct led_classdev *led;
+
+ /* ignore space characters before the value. */
+ while (rc < size && isspace(buf[rc]))
@@ -336,7 +340,7 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+ * Activate and deactivate are called on individual LEDs when the
+ * LED trigger property is changed. The LED write lock is held.
+ */
-+static void leds_cpu_trigger_activate(struct led_device *led)
++static void leds_cpu_trigger_activate(struct led_classdev *led)
+{
+ /*
+ * The initial setting of the trigger is simple CPU activity
@@ -358,7 +362,7 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+ led_set_brightness(led, LED_FULL);
+}
+
-+static void leds_cpu_trigger_deactivate(struct led_device *led)
++static void leds_cpu_trigger_deactivate(struct led_classdev *led)
+{
+ struct cpu_trigger_data *data = led->trigger_data;
+ if (likely(data != 0)) {
@@ -422,9 +426,9 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+ leds_cpu_trigger_mark(data, now) ? LED_FULL : LED_OFF;
+ struct list_head *entry;
+
-+ list_for_each(entry, &data->trigger.led_devs) {
-+ struct led_device *led =
-+ list_entry(entry, struct led_device, trig_list);
++ list_for_each(entry, &data->trigger.led_cdevs) {
++ struct led_classdev *led =
++ list_entry(entry, struct led_classdev, trig_list);
+
+ blinking |= leds_cpu_trigger_led_state_change(led,
+ active, brightness);
@@ -574,9 +578,8 @@ diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/drivers/leds/led
+MODULE_AUTHOR("John Bowler <jbowler@acm.org>");
+MODULE_DESCRIPTION("CPU activity LED trigger");
+MODULE_LICENSE("MIT");
-diff -rup linux-2.6.15.2/.pc/951-ixp4xx-leds-cpu-activity.patch/include/linux/leds.h linux-2.6.15.2/include/linux/leds.h
---- linux-2.6.15/include/linux/leds.h 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.15/include/linux/leds.h 1970-01-01 00:00:00.000000000 +0000
+--- linux-ixp4xx.orig/include/linux/leds.h 2006-02-21 00:54:33.000000000 +0100
++++ linux-ixp4xx/include/linux/leds.h 2006-02-21 01:03:33.000000000 +0100
@@ -95,3 +95,12 @@ void led_trigger_event(struct led_trigge
#define led_trigger_event(x, y) do {} while(0)