led: remove camel casing of led identifiers globally
Subsystems (2)
PATCH 1/1 led: remove camel casing of led identifiers globally
From: Jason Kridner <[email protected]>
Result of running the following command to address Wolfgang's comment about camel case:
for file in find . | grep '\.[ch]$'; 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 <[email protected]>
Signed-off-by Joel A Fernandes <[email protected]>
--- arch/arm/cpu/arm920t/ep93xx/led.c | 24 +++++++++--------- arch/arm/cpu/arm926ejs/at91/led.c | 12 ++++---- arch/arm/lib/board.c | 32 ++++++++++++------------ board/atmel/at91rm9200dk/led.c | 12 ++++---- board/atmel/at91rm9200ek/led.c | 12 ++++---- board/eukrea/cpu9260/led.c | 48 ++++++++++++++++++------------------ board/logicpd/zoom2/led.c | 28 ++++++++++---------- board/ti/beagle/led.c | 4 +- common/cmd_led.c | 8 +++--- include/status_led.h | 32 ++++++++++++------------ 10 files changed, 106 insertions(+), 106 deletions(-)
arch/arm/cpu/arm920t/ep93xx/led.c +12 -12
@@ -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 (); } }
arch/arm/cpu/arm926ejs/at91/led.c +6 -6
@@ -29,36 +29,36 @@#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 ); }
arch/arm/lib/board.c +16 -16
@@ -94,22 +94,22 @@ extern void rtl8019_get_enetaddr (uchar * addr);*/ void inline __coloured_LED_init (void ) {}void coloured_LED_init (void ) __attribute__((weak,alias ("__coloured_LED_init" ))); -void inline __red_LED_on (void ) {} -void red_LED_on (void ) __attribute__((weak,alias ("__red_LED_on" ))); -void inline __red_LED_off (void ) {} -void red_LED_off (void ) __attribute__((weak,alias ("__red_LED_off" ))); -void inline __green_LED_on (void ) {} -void green_LED_on (void ) __attribute__((weak,alias ("__green_LED_on" ))); -void inline __green_LED_off (void ) {} -void green_LED_off (void ) __attribute__((weak,alias ("__green_LED_off" ))); -void inline __yellow_LED_on (void ) {} -void yellow_LED_on (void ) __attribute__((weak,alias ("__yellow_LED_on" ))); -void inline __yellow_LED_off (void ) {} -void yellow_LED_off (void ) __attribute__((weak,alias ("__yellow_LED_off" ))); -void inline __blue_LED_on (void ) {} -void blue_LED_on (void ) __attribute__((weak,alias ("__blue_LED_on" ))); -void inline __blue_LED_off (void ) {} -void blue_LED_off (void ) __attribute__((weak,alias ("__blue_LED_off" ))); +void inline __red_led_on (void ) {} +void red_led_on (void ) __attribute__((weak,alias ("__red_led_on" ))); +void inline __red_led_off (void ) {} +void red_led_off (void ) __attribute__((weak,alias ("__red_led_off" ))); +void inline __green_led_on (void ) {} +void green_led_on (void ) __attribute__((weak,alias ("__green_led_on" ))); +void inline __green_led_off (void ) {} +void green_led_off (void ) __attribute__((weak,alias ("__green_led_off" ))); +void inline __yellow_led_on (void ) {} +void yellow_led_on (void ) __attribute__((weak,alias ("__yellow_led_on" ))); +void inline __yellow_led_off (void ) {} +void yellow_led_off (void ) __attribute__((weak,alias ("__yellow_led_off" ))); +void inline __blue_led_on (void ) {} +void blue_led_on (void ) __attribute__((weak,alias ("__blue_led_on" ))); +void inline __blue_led_off (void ) {} +void blue_led_off (void ) __attribute__((weak,alias ("__blue_led_off" )));/************************************************************************ * Init Utilities *
board/atmel/at91rm9200dk/led.c +6 -6
@@ -29,37 +29,37 @@#define YELLOW_LED AT91C_PIO_PB1#define RED_LED AT91C_PIO_PB2 -void green_LED_on (void ) +void green_led_on (void ) {AT91PS_PIO PIOB =AT91C_BASE_PIOB ;PIOB ->PIO_CODR =GREEN_LED ; } -void yellow_LED_on (void ) +void yellow_led_on (void ) {AT91PS_PIO PIOB =AT91C_BASE_PIOB ;PIOB ->PIO_CODR =YELLOW_LED ; } -void red_LED_on (void ) +void red_led_on (void ) {AT91PS_PIO PIOB =AT91C_BASE_PIOB ;PIOB ->PIO_CODR =RED_LED ; } -void green_LED_off (void ) +void green_led_off (void ) {AT91PS_PIO PIOB =AT91C_BASE_PIOB ;PIOB ->PIO_SODR =GREEN_LED ; } -void yellow_LED_off (void ) +void yellow_led_off (void ) {AT91PS_PIO PIOB =AT91C_BASE_PIOB ;PIOB ->PIO_SODR =YELLOW_LED ; } -void red_LED_off (void ) +void red_led_off (void ) {AT91PS_PIO PIOB =AT91C_BASE_PIOB ;PIOB ->PIO_SODR =RED_LED ;
board/atmel/at91rm9200ek/led.c +6 -6
@@ -36,37 +36,37 @@#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);
board/eukrea/cpu9260/led.c +24 -24
120 lines not on this page · raw message
board/logicpd/zoom2/led.c +14 -14
@@ -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 (!omap_request_gpio (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 (!omap_request_gpio (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 (!omap_request_gpio (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 (!omap_request_gpio (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 (); } }
board/ti/beagle/led.c +2 -2
@@ -29,12 +29,12 @@#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 ); }
common/cmd_led.c +4 -4
@@ -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 } };
include/status_led.h +16 -16
@@ -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 */
Signature · 1 line
1.7.1