[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd8V+pcvfhCnkjmc=oteRaav4p97Jiyd7NRJPQ1DCF+QhQ@mail.gmail.com>
Date: Fri, 26 Oct 2012 22:50:54 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: linus.walleij@...aro.org, grant.likely@...retlab.ca,
rob.herring@...xeda.com
Cc: yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org,
devicetree-discuss@...ts.ozlabs.org
Subject: [PATCH -next] ARM: at91: using for_each_set_bit to simplify the code
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
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@...ndmicro.com.cn>
---
drivers/pinctrl/pinctrl-at91.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 01bf924..cccac23 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1220,10 +1220,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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists