diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-10-04 21:53:32 +0200 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2011-12-20 22:28:51 +0100 |
commit | c0e6723ee4b98fa0bda48028568bc3f853682567 (patch) | |
tree | 06da4a8179252e1eb1159849619edd3d64b3c498 | |
parent | 901de79a3792c81aefcbf207a34049e63f21362b (diff) | |
download | u-boot-imx-c0e6723ee4b98fa0bda48028568bc3f853682567.zip u-boot-imx-c0e6723ee4b98fa0bda48028568bc3f853682567.tar.gz u-boot-imx-c0e6723ee4b98fa0bda48028568bc3f853682567.tar.bz2 |
AVR32: fix timer_init() function
timer_init() now returns an int (the error code) instead of void.
This makes compilation fail with:
interrupts.c:111: error: conflicting types for 'timer_init'
/home/svens/u-boot/u-boot/include/common.h:246: error: previous
declaration of 'timer_init' was here
make[1]: *** [interrupts.o] Error 1
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r-- | arch/avr32/cpu/interrupts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/avr32/cpu/interrupts.c b/arch/avr32/cpu/interrupts.c index 6681e13..49a00f1 100644 --- a/arch/avr32/cpu/interrupts.c +++ b/arch/avr32/cpu/interrupts.c @@ -107,7 +107,7 @@ static int set_interrupt_handler(unsigned int nr, void (*handler)(void), return 0; } -void timer_init(void) +int timer_init(void) { extern void timer_interrupt_handler(void); u64 tmp; @@ -120,8 +120,9 @@ void timer_init(void) tb_factor = (u32)tmp; if (set_interrupt_handler(0, &timer_interrupt_handler, 3)) - return; + return -EINVAL; /* For all practical purposes, this gives us an overflow interrupt */ sysreg_write(COMPARE, 0xffffffff); + return 0; } |