[U-Boot] [PATCH] avr32: fix timer_init() return type

Mike Frysinger vapier at gentoo.org
Thu Oct 13 07:11:06 CEST 2011


The common.h header says this has to return an int, otherwise we get
build failures due to mismatched prototype and function definition.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 arch/avr32/cpu/interrupts.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/cpu/interrupts.c b/arch/avr32/cpu/interrupts.c
index 6681e13..1127580 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,10 @@ void timer_init(void)
 	tb_factor = (u32)tmp;
 
 	if (set_interrupt_handler(0, &timer_interrupt_handler, 3))
-		return;
+		return 0;
 
 	/* For all practical purposes, this gives us an overflow interrupt */
 	sysreg_write(COMPARE, 0xffffffff);
+
+	return 0;
 }
-- 
1.7.6.1



More information about the U-Boot mailing list