led: remove camel casing of led identifiers globally
authorJason Kridner <jkridner@beagleboard.org>
Sun, 4 Sep 2011 18:40:16 +0000 (14:40 -0400)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 13 Sep 2011 06:30:52 +0000 (08:30 +0200)
Result of running the following command to address Wolfgang's
comment about camel case:

for file in `find . | grep '\.[chS]$'`; do perl -i -pe
's/(green|yellow|red|blue)_LED_(on|off)/$1_led_$2/g' $file; done

Discussion:
http://patchwork.ozlabs.org/patch/84988/

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
18 files changed:
arch/arm/cpu/arm1176/start.S
arch/arm/cpu/arm720t/start.S
arch/arm/cpu/arm920t/ep93xx/led.c
arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S
arch/arm/cpu/arm920t/start.S
arch/arm/cpu/arm925t/start.S
arch/arm/cpu/arm926ejs/at91/led.c
arch/arm/cpu/arm926ejs/start.S
arch/arm/cpu/arm_intcm/start.S
arch/arm/cpu/ixp/start.S
arch/arm/cpu/s3c44b0/start.S
arch/arm/lib/board.c
board/atmel/at91rm9200ek/led.c
board/eukrea/cpu9260/led.c
board/logicpd/zoom2/led.c
board/ti/beagle/led.c
common/cmd_led.c
include/status_led.h

index 0aa613d2af87105ca18011955a543c2c52de98d2..848144a851716073eae077cdd4818154a6f4896c 100644 (file)
@@ -358,7 +358,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
 
 #ifndef CONFIG_NAND_SPL
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 #endif
 
index 00fa8c95eaaf661ca0ed10c36b3b66f0e61b7651..540e3c2f722dac06f1b8f07b2ac09369c635b6cd 100644 (file)
@@ -234,7 +234,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index 7e2c897757066eacda0f7eab1727fcdff2b3422f..0aefa7f1e5a5f9cd8fe53c9698c86ee5242edc20 100644 (file)
@@ -45,22 +45,22 @@ inline void switch_LED_off(uint8_t led)
        saved_state[led] = STATUS_LED_OFF;
 }
 
-void red_LED_on(void)
+void red_led_on(void)
 {
        switch_LED_on(STATUS_LED_RED);
 }
 
-void red_LED_off(void)
+void red_led_off(void)
 {
        switch_LED_off(STATUS_LED_RED);
 }
 
-void green_LED_on(void)
+void green_led_on(void)
 {
        switch_LED_on(STATUS_LED_GREEN);
 }
 
-void green_LED_off(void)
+void green_led_off(void)
 {
        switch_LED_off(STATUS_LED_GREEN);
 }
@@ -74,14 +74,14 @@ void __led_toggle(led_id_t mask)
 {
        if (STATUS_LED_RED == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_RED])
-                       red_LED_off();
+                       red_led_off();
                else
-                       red_LED_on();
+                       red_led_on();
        } else if (STATUS_LED_GREEN == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_GREEN])
-                       green_LED_off();
+                       green_led_off();
                else
-                       green_LED_on();
+                       green_led_on();
        }
 }
 
@@ -89,13 +89,13 @@ void __led_set(led_id_t mask, int state)
 {
        if (STATUS_LED_RED == mask) {
                if (STATUS_LED_ON == state)
-                       red_LED_on();
+                       red_led_on();
                else
-                       red_LED_off();
+                       red_led_off();
        } else if (STATUS_LED_GREEN == mask) {
                if (STATUS_LED_ON == state)
-                       green_LED_on();
+                       green_led_on();
                else
-                       green_LED_off();
+                       green_led_off();
        }
 }
index a20ec894be0d8b33cbff440db610c0d5d306f47a..f21e2372ede339d9552a30860c3f4d24ae4269c8 100644 (file)
@@ -34,8 +34,8 @@ lowlevel_init:
        str lr, [r1]
 
        /* Turn on both LEDs */
-       bl red_LED_on
-       bl green_LED_on
+       bl red_led_on
+       bl green_led_on
 
        /* Configure flash wait states before we switch to the PLL */
        bl flash_cfg
@@ -44,14 +44,14 @@ lowlevel_init:
        bl pll_cfg
 
        /* Turn off the Green LED and leave the Red LED on */
-       bl green_LED_off
+       bl green_led_off
 
        /* Setup SDRAM */
        bl sdram_cfg
 
        /* Turn on Green LED, Turn off the Red LED */
-       bl green_LED_on
-       bl red_LED_off
+       bl green_led_on
+       bl red_led_off
 
        /* FIXME: we use async mode for now */
        mrc p15, 0, r0, c1, c0, 0
index c3084208e1cf2821389151bb8b3535404186bbd3..8c5612c31e13e7e2d20ac07f7bee7bbc40a13210 100644 (file)
@@ -277,7 +277,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index 17cf5dcae6e01979f1594aa90f63c6bc13577e63..dbb93ef09ffd649292292b54430014847886a57b 100644 (file)
@@ -271,7 +271,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index 6bcfa7f2fd5ee4b75590dbe12e15d361e8d31d27..6e59c8667589dd4bd8197000ac0493e98c08c5e7 100644 (file)
 #include <asm/arch/gpio.h>
 
 #ifdef CONFIG_RED_LED
-void red_LED_on(void)
+void red_led_on(void)
 {
        at91_set_gpio_value(CONFIG_RED_LED, 1);
 }
 
-void red_LED_off(void)
+void red_led_off(void)
 {
        at91_set_gpio_value(CONFIG_RED_LED, 0);
 }
 #endif
 
 #ifdef CONFIG_GREEN_LED
-void green_LED_on(void)
+void green_led_on(void)
 {
        at91_set_gpio_value(CONFIG_GREEN_LED, 0);
 }
 
-void green_LED_off(void)
+void green_led_off(void)
 {
        at91_set_gpio_value(CONFIG_GREEN_LED, 1);
 }
 #endif
 
 #ifdef CONFIG_YELLOW_LED
-void yellow_LED_on(void)
+void yellow_led_on(void)
 {
        at91_set_gpio_value(CONFIG_YELLOW_LED, 0);
 }
 
-void yellow_LED_off(void)
+void yellow_led_off(void)
 {
        at91_set_gpio_value(CONFIG_YELLOW_LED, 1);
 }
index 16e35c288c1a9257021b8e579f86b3f14e6949fe..d164d6d6caa6c83b4903a7a168558f35e9f48c54 100644 (file)
@@ -270,7 +270,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index ba96208c634e3b5a7ee99b3b44267feedffa13b1..2033b362f7b1033090361cfa56704f7936d6fb67 100644 (file)
@@ -238,7 +238,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index b17d267ea0d8d40697d33f218e362b867880fdc9..cb32121a07120ee0ba0760e11730b25ce354550c 100644 (file)
@@ -340,7 +340,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index 2545cf6b1aae87c3e0c1f08e1ca8e76a971ce283..a29d5b49644067e64a588e3b25b912e1de8c1996 100644 (file)
@@ -223,7 +223,7 @@ clbss_l:str r2, [r0]                /* clear loop...                    */
        bne     clbss_l
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*
index a7fb251aa7207e22054c04f7eb0b052b27d67b8f..85320bc19006cbbc4a0d8daeeb22b882e9f3d4f2 100644 (file)
@@ -87,22 +87,22 @@ extern void rtl8019_get_enetaddr (uchar * addr);
 inline void __coloured_LED_init(void) {}
 void coloured_LED_init(void)
        __attribute__((weak, alias("__coloured_LED_init")));
-inline void __red_LED_on(void) {}
-void red_LED_on(void) __attribute__((weak, alias("__red_LED_on")));
-inline void __red_LED_off(void) {}
-void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
-inline void __green_LED_on(void) {}
-void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
-inline void __green_LED_off(void) {}
-void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
-inline void __yellow_LED_on(void) {}
-void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
-inline void __yellow_LED_off(void) {}
-void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
-inline void __blue_LED_on(void) {}
-void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
-inline void __blue_LED_off(void) {}
-void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
+inline void __red_led_on(void) {}
+void red_led_on(void) __attribute__((weak, alias("__red_led_on")));
+inline void __red_led_off(void) {}
+void red_led_off(void) __attribute__((weak, alias("__red_led_off")));
+inline void __green_led_on(void) {}
+void green_led_on(void) __attribute__((weak, alias("__green_led_on")));
+inline void __green_led_off(void) {}
+void green_led_off(void) __attribute__((weak, alias("__green_led_off")));
+inline void __yellow_led_on(void) {}
+void yellow_led_on(void) __attribute__((weak, alias("__yellow_led_on")));
+inline void __yellow_led_off(void) {}
+void yellow_led_off(void) __attribute__((weak, alias("__yellow_led_off")));
+inline void __blue_led_on(void) {}
+void blue_led_on(void) __attribute__((weak, alias("__blue_led_on")));
+inline void __blue_led_off(void) {}
+void blue_led_off(void) __attribute__((weak, alias("__blue_led_off")));
 
 /*
  ************************************************************************
index 1766ddf68a5225402ae0e070145827a49d7e9e64..facba2488d0f37e87c28e5b8a45d9306331684cd 100644 (file)
 #define        YELLOW_LED      (1<<1)
 #define        RED_LED         (1<<2)
 
-void   green_LED_on(void)
+void   green_led_on(void)
 {
        at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
        writel(GREEN_LED, &pio->piob.codr);
 }
 
-void    yellow_LED_on(void)
+void    yellow_led_on(void)
 {
        at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
        writel(YELLOW_LED, &pio->piob.codr);
 }
 
-void    red_LED_on(void)
+void    red_led_on(void)
 {
        at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
        writel(RED_LED, &pio->piob.codr);
 }
 
-void   green_LED_off(void)
+void   green_led_off(void)
 {
        at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
        writel(GREEN_LED, &pio->piob.sodr);
 }
 
-void   yellow_LED_off(void)
+void   yellow_led_off(void)
 {
        at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
        writel(YELLOW_LED, &pio->piob.sodr);
 }
 
-void   red_LED_off(void)
+void   red_led_off(void)
 {
        at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
        writel(RED_LED, &pio->piob.sodr);
index 8d865eb87070c7bb9f108ac15b92d88d36eb7221..434cffbd26844bfe5b6948c3e8a0c225eec5d0f6 100644 (file)
@@ -51,49 +51,49 @@ void coloured_LED_init(void)
        at91_set_pio_value(CONFIG_BLUE_LED, 1);
 }
 
-void red_LED_off(void)
+void red_led_off(void)
 {
        at91_set_pio_value(CONFIG_RED_LED, 1);
        saved_state[STATUS_LED_RED] = STATUS_LED_OFF;
 }
 
-void green_LED_off(void)
+void green_led_off(void)
 {
        at91_set_pio_value(CONFIG_GREEN_LED, 1);
        saved_state[STATUS_LED_GREEN] = STATUS_LED_OFF;
 }
 
-void yellow_LED_off(void)
+void yellow_led_off(void)
 {
        at91_set_pio_value(CONFIG_YELLOW_LED, 1);
        saved_state[STATUS_LED_YELLOW] = STATUS_LED_OFF;
 }
 
-void blue_LED_off(void)
+void blue_led_off(void)
 {
        at91_set_pio_value(CONFIG_BLUE_LED, 1);
        saved_state[STATUS_LED_BLUE] = STATUS_LED_OFF;
 }
 
-void red_LED_on(void)
+void red_led_on(void)
 {
        at91_set_pio_value(CONFIG_RED_LED, 0);
        saved_state[STATUS_LED_RED] = STATUS_LED_ON;
 }
 
-void green_LED_on(void)
+void green_led_on(void)
 {
        at91_set_pio_value(CONFIG_GREEN_LED, 0);
        saved_state[STATUS_LED_GREEN] = STATUS_LED_ON;
 }
 
-void yellow_LED_on(void)
+void yellow_led_on(void)
 {
        at91_set_pio_value(CONFIG_YELLOW_LED, 0);
        saved_state[STATUS_LED_YELLOW] = STATUS_LED_ON;
 }
 
-void blue_LED_on(void)
+void blue_led_on(void)
 {
        at91_set_pio_value(CONFIG_BLUE_LED, 0);
        saved_state[STATUS_LED_BLUE] = STATUS_LED_ON;
@@ -108,24 +108,24 @@ void __led_toggle(led_id_t mask)
 {
        if (STATUS_LED_BLUE == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_BLUE])
-                       blue_LED_off();
+                       blue_led_off();
                else
-                       blue_LED_on();
+                       blue_led_on();
        } else if (STATUS_LED_RED == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_RED])
-                       red_LED_off();
+                       red_led_off();
                else
-                       red_LED_on();
+                       red_led_on();
        } else if (STATUS_LED_GREEN == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_GREEN])
-                       green_LED_off();
+                       green_led_off();
                else
-                       green_LED_on();
+                       green_led_on();
        } else if (STATUS_LED_YELLOW == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_YELLOW])
-                       yellow_LED_off();
+                       yellow_led_off();
                else
-                       yellow_LED_on();
+                       yellow_led_on();
        }
 }
 
@@ -133,23 +133,23 @@ void __led_set(led_id_t mask, int state)
 {
        if (STATUS_LED_BLUE == mask) {
                if (STATUS_LED_ON == state)
-                       blue_LED_on();
+                       blue_led_on();
                else
-                       blue_LED_off();
+                       blue_led_off();
        } else if (STATUS_LED_RED == mask) {
                if (STATUS_LED_ON == state)
-                       red_LED_on();
+                       red_led_on();
                else
-                       red_LED_off();
+                       red_led_off();
        } else if (STATUS_LED_GREEN == mask) {
                if (STATUS_LED_ON == state)
-                       green_LED_on();
+                       green_led_on();
                else
-                       green_LED_off();
+                       green_led_off();
        } else if (STATUS_LED_YELLOW == mask) {
                if (STATUS_LED_ON == state)
-                       yellow_LED_on();
+                       yellow_led_on();
                else
-                       yellow_LED_off();
+                       yellow_led_off();
        }
 }
index 42553727e4a1102676674f9e27659098292d2bde..528844efcfe2646e1e191a8bcbd7144f04d15fb2 100644 (file)
@@ -36,7 +36,7 @@ static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
 #define ZOOM2_LED_BLUE 154
 #define ZOOM2_LED_BLUE2        61
 
-void red_LED_off (void)
+void red_led_off(void)
 {
        /* red */
        if (!gpio_request(ZOOM2_LED_RED, "")) {
@@ -46,7 +46,7 @@ void red_LED_off (void)
        saved_state[STATUS_LED_RED] = STATUS_LED_OFF;
 }
 
-void blue_LED_off (void)
+void blue_led_off(void)
 {
        /* blue */
        if (!gpio_request(ZOOM2_LED_BLUE, "")) {
@@ -62,9 +62,9 @@ void blue_LED_off (void)
        saved_state[STATUS_LED_BLUE] = STATUS_LED_OFF;
 }
 
-void red_LED_on (void)
+void red_led_on(void)
 {
-       blue_LED_off ();
+       blue_led_off();
 
        /* red */
        if (!gpio_request(ZOOM2_LED_RED, "")) {
@@ -74,9 +74,9 @@ void red_LED_on (void)
        saved_state[STATUS_LED_RED] = STATUS_LED_ON;
 }
 
-void blue_LED_on (void)
+void blue_led_on(void)
 {
-       red_LED_off ();
+       red_led_off();
 
        /* blue */
        if (!gpio_request(ZOOM2_LED_BLUE, "")) {
@@ -102,14 +102,14 @@ void __led_toggle (led_id_t mask)
 {
        if (STATUS_LED_BLUE == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_BLUE])
-                       blue_LED_off ();
+                       blue_led_off();
                else
-                       blue_LED_on ();
+                       blue_led_on();
        } else if (STATUS_LED_RED == mask) {
                if (STATUS_LED_ON == saved_state[STATUS_LED_RED])
-                       red_LED_off ();
+                       red_led_off();
                else
-                       red_LED_on ();
+                       red_led_on();
        }
 }
 
@@ -117,13 +117,13 @@ void __led_set (led_id_t mask, int state)
 {
        if (STATUS_LED_BLUE == mask) {
                if (STATUS_LED_ON == state)
-                       blue_LED_on ();
+                       blue_led_on();
                else
-                       blue_LED_off ();
+                       blue_led_off();
        } else if (STATUS_LED_RED == mask) {
                if (STATUS_LED_ON == state)
-                       red_LED_on ();
+                       red_led_on();
                else
-                       red_LED_off ();
+                       red_led_off();
        }
 }
index 1779242a01c7bd6623a898ce012e75fc4987e64e..ac21a95732262b8e807d89ca7cf3d8f95cca7a6c 100644 (file)
 #define BEAGLE_LED_USR1        149
 
 #ifdef STATUS_LED_GREEN
-void green_LED_off (void)
+void green_led_off(void)
 {
        __led_set (STATUS_LED_GREEN, 0);
 }
 
-void green_LED_on (void)
+void green_led_on(void)
 {
        __led_set (STATUS_LED_GREEN, 1);
 }
index 0e4ebc59c0bac370fde2016abefe634b1880ecc0..f55f94c903df8a3899ec3b6686e9f6bd91efabeb 100644 (file)
@@ -57,16 +57,16 @@ static const led_tbl_t led_commands[] = {
 #endif
 #endif
 #ifdef STATUS_LED_GREEN
-       { "green", STATUS_LED_GREEN, green_LED_off, green_LED_on, NULL },
+       { "green", STATUS_LED_GREEN, green_led_off, green_led_on, NULL },
 #endif
 #ifdef STATUS_LED_YELLOW
-       { "yellow", STATUS_LED_YELLOW, yellow_LED_off, yellow_LED_on, NULL },
+       { "yellow", STATUS_LED_YELLOW, yellow_led_off, yellow_led_on, NULL },
 #endif
 #ifdef STATUS_LED_RED
-       { "red", STATUS_LED_RED, red_LED_off, red_LED_on, NULL },
+       { "red", STATUS_LED_RED, red_led_off, red_led_on, NULL },
 #endif
 #ifdef STATUS_LED_BLUE
-       { "blue", STATUS_LED_BLUE, blue_LED_off, blue_LED_on, NULL },
+       { "blue", STATUS_LED_BLUE, blue_led_off, blue_led_on, NULL },
 #endif
        { NULL, 0, NULL, NULL, NULL }
 };
index 360195c961f981aa46b25273ac70942c5135d00b..59143296c39d02ef6f9b5a462322e2f19082b4e1 100644 (file)
@@ -357,24 +357,24 @@ extern void __led_set (led_id_t mask, int state);
  */
 #ifndef        __ASSEMBLY__
 extern void    coloured_LED_init (void);
-extern void    red_LED_on(void);
-extern void    red_LED_off(void);
-extern void    green_LED_on(void);
-extern void    green_LED_off(void);
-extern void    yellow_LED_on(void);
-extern void    yellow_LED_off(void);
-extern void    blue_LED_on(void);
-extern void    blue_LED_off(void);
+extern void    red_led_on(void);
+extern void    red_led_off(void);
+extern void    green_led_on(void);
+extern void    green_led_off(void);
+extern void    yellow_led_on(void);
+extern void    yellow_led_off(void);
+extern void    blue_led_on(void);
+extern void    blue_led_off(void);
 #else
        .extern LED_init
-       .extern red_LED_on
-       .extern red_LED_off
-       .extern yellow_LED_on
-       .extern yellow_LED_off
-       .extern green_LED_on
-       .extern green_LED_off
-       .extern blue_LED_on
-       .extern blue_LED_off
+       .extern red_led_on
+       .extern red_led_off
+       .extern yellow_led_on
+       .extern yellow_led_off
+       .extern green_led_on
+       .extern green_led_off
+       .extern blue_led_on
+       .extern blue_led_off
 #endif
 
 #endif /* CONFIG_STATUS_LED    */