summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorChin Liang See <clsee@altera.com>2015-12-09 21:23:54 +0800
committerChin Liang See <clsee@altera.com>2015-12-09 21:33:29 +0800
commit8b4e29b77dc33c67671494dda73ffaac34770d69 (patch)
tree141ec43aa3a21ad19fdefec26e40be27845d7478 /arch
parent07b18884633b2ceedc66dc85c3889be68b08c924 (diff)
downloadu-boot-socfpga-8b4e29b77dc33c67671494dda73ffaac34770d69.tar.gz
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> Signed-off-by: Chin Liang See <clsee@altera.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/board.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 9f861ccaf6..44235dab7d 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -77,25 +77,15 @@ extern void dataflash_print_info(void);
************************************************************************
* 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) {}
/*
************************************************************************