From 03164df6fe4b39e09366e096808b3934cfc55693 Mon Sep 17 00:00:00 2001 From: juhosg Date: Sun, 20 Apr 2008 09:10:50 +0000 Subject: [atheros] remove the clz function, use fls instead git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10878 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/atheros/files/arch/mips/atheros/ar5315/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target/linux/atheros/files/arch') diff --git a/target/linux/atheros/files/arch/mips/atheros/ar5315/irq.c b/target/linux/atheros/files/arch/mips/atheros/ar5315/irq.c index ed784ba88..69cb362a0 100644 --- a/target/linux/atheros/files/arch/mips/atheros/ar5315/irq.c +++ b/target/linux/atheros/files/arch/mips/atheros/ar5315/irq.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,7 @@ static inline void ar5315_gpio_irq(void) if (!pend) return; - do_IRQ(AR531X_GPIO_IRQ_BASE + 31 - clz(pend)); + do_IRQ(AR531X_GPIO_IRQ_BASE + fls(pend) - 1); } -- cgit v1.2.3