diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-13 22:28:31 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-09-18 17:16:54 -0400 |
commit | 939d902d0de58982fc95b04c5cd37c5e30ffe46f (patch) | |
tree | 946d029827b380f1bcbaaed78121102a0b677864 /drivers/gpio | |
parent | 3113e679021a3a6bace1c62a8432cc0ec27c09ab (diff) |
gpio_msm: using for_each_set_bit to simplify the code
Using for_each_set_bit() to simplify the code.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-msm-v2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c index 5cb1227d69cf..38305beb4375 100644 --- a/drivers/gpio/gpio-msm-v2.c +++ b/drivers/gpio/gpio-msm-v2.c | |||
@@ -317,9 +317,7 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
317 | 317 | ||
318 | chained_irq_enter(chip, desc); | 318 | chained_irq_enter(chip, desc); |
319 | 319 | ||
320 | for (i = find_first_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS); | 320 | for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS) { |
321 | i < NR_GPIO_IRQS; | ||
322 | i = find_next_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS, i + 1)) { | ||
323 | if (readl(GPIO_INTR_STATUS(i)) & BIT(INTR_STATUS)) | 321 | if (readl(GPIO_INTR_STATUS(i)) & BIT(INTR_STATUS)) |
324 | generic_handle_irq(msm_gpio_to_irq(&msm_gpio.gpio_chip, | 322 | generic_handle_irq(msm_gpio_to_irq(&msm_gpio.gpio_chip, |
325 | i)); | 323 | i)); |