pinctrl/at91: using for_each_set_bit to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 26 Oct 2012 14:50:54 +0000 (22:50 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 28 Oct 2012 19:34:09 +0000 (20:34 +0100)
Using for_each_set_bit() to simplify the code.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c

index 62f2fe47b46b279213b189e6fd952bd04454a451..ddfb5dbd88dba26bf7ae1c681333d932665d9377 100644 (file)
@@ -1219,10 +1219,8 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
                        continue;
                }
 
-               n = find_first_bit(&isr, BITS_PER_LONG);
-               while (n < BITS_PER_LONG) {
+               for_each_set_bit(n, &isr, BITS_PER_LONG) {
                        generic_handle_irq(irq_find_mapping(at91_gpio->domain, n));
-                       n = find_next_bit(&isr, BITS_PER_LONG, n + 1);
                }
        }
        chained_irq_exit(chip, desc);
This page took 0.029785 seconds and 5 git commands to generate.