]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/txx9/rbtx4938/irq.c
MIPS: TXx9: Microoptimize interrupt handlers
[linux-2.6-omap-h63xx.git] / arch / mips / txx9 / rbtx4938 / irq.c
index ca2f8306ce93b1e95fde8594793507c4bdc356df..7d21befb8932c5ba36df028cb74b1c66e61c652d 100644 (file)
@@ -85,10 +85,10 @@ static int toshiba_rbtx4938_irq_nested(int sw_irq)
        u8 level3;
 
        level3 = readb(rbtx4938_imstat_addr);
-       if (level3)
-               /* must use fls so onboard ATA has priority */
-               sw_irq = RBTX4938_IRQ_IOC + fls(level3) - 1;
-       return sw_irq;
+       if (unlikely(!level3))
+               return -1;
+       /* must use fls so onboard ATA has priority */
+       return RBTX4938_IRQ_IOC + __fls8(level3);
 }
 
 static void __init