From: Wei Yongjun Date: Fri, 26 Oct 2012 14:50:54 +0000 (+0800) Subject: pinctrl/at91: using for_each_set_bit to simplify the code X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=05daa16a86b1f822eeb4324f8874d4d9b915a717;p=deliverable%2Flinux.git pinctrl/at91: using for_each_set_bit to simplify the code 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 Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 62f2fe47b46b..ddfb5dbd88db 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -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);