diff options
author | Jeroen Hofstee <jeroen@myspectrum.nl> | 2014-06-23 23:20:19 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-07-18 17:53:23 -0400 |
commit | c5d4001a1cbca546f83ec7f2299c664fb00e6451 (patch) | |
tree | f110afcbefbf28e8aa50c00247181e2de7ab0d9c /common | |
parent | 0e350f81e1ca7d103fd9685725f9c4b0d9e80632 (diff) | |
download | u-boot-imx-c5d4001a1cbca546f83ec7f2299c664fb00e6451.zip u-boot-imx-c5d4001a1cbca546f83ec7f2299c664fb00e6451.tar.gz u-boot-imx-c5d4001a1cbca546f83ec7f2299c664fb00e6451.tar.bz2 |
common: board_f: cosmetic use __weak for leds
First of all this looks a lot better, but it also
prevents a gcc warning (W=1), that the weak function
has no previous prototype.
cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/board_f.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/common/board_f.c b/common/board_f.c index 4ea4cb2..bdab38e 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -37,6 +37,7 @@ #include <os.h> #include <post.h> #include <spi.h> +#include <status_led.h> #include <trace.h> #include <watchdog.h> #include <asm/errno.h> @@ -78,25 +79,15 @@ DECLARE_GLOBAL_DATA_PTR; ************************************************************************ * May be supplied by boards if desired */ -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"))); +__weak void coloured_LED_init(void) {} +__weak void red_led_on(void) {} +__weak void red_led_off(void) {} +__weak void green_led_on(void) {} +__weak void green_led_off(void) {} +__weak void yellow_led_on(void) {} +__weak void yellow_led_off(void) {} +__weak void blue_led_on(void) {} +__weak void blue_led_off(void) {} /* * Why is gd allocated a register? Prior to reloc it might be better to |