From 2c75c78d94574ee996db2aa9b511258519471dd6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 15 May 2009 23:45:22 +0200 Subject: [PATCH] ixp/interrupts: Move conditional compilation to Makefile Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/ixp/Makefile | 3 ++- cpu/ixp/interrupts.c | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cpu/ixp/Makefile b/cpu/ixp/Makefile index 7e98d87026..a673cb1b9f 100644 --- a/cpu/ixp/Makefile +++ b/cpu/ixp/Makefile @@ -27,9 +27,10 @@ LIB = $(obj)lib$(CPU).a START = start.o COBJS-y += cpu.o -COBJS-y += interrupts.o ifndef CONFIG_USE_IRQ COBJS-y += timer.o +else +COBJS-y += interrupts.o endif SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) diff --git a/cpu/ixp/interrupts.c b/cpu/ixp/interrupts.c index 621f31b00f..ee0129ead3 100644 --- a/cpu/ixp/interrupts.c +++ b/cpu/ixp/interrupts.c @@ -31,8 +31,6 @@ #include #include - -#ifdef CONFIG_USE_IRQ #include /* @@ -85,20 +83,15 @@ void reset_timer (void) timestamp = 0; } -#endif /* #ifdef CONFIG_USE_IRQ */ - -#ifdef CONFIG_USE_IRQ void do_irq (struct pt_regs *pt_regs) { int irq = next_irq(); IRQ_HANDLER[irq].m_func(IRQ_HANDLER[irq].m_data); } -#endif int interrupt_init (void) { -#ifdef CONFIG_USE_IRQ int i; /* install default interrupt handlers */ @@ -119,7 +112,6 @@ int interrupt_init (void) /* enable timer irq */ *IXP425_ICMR = (1 << IXP425_TIMER_2_IRQ); -#endif return (0); } -- 2.30.2