Skip to content

Commit

Permalink
gpio_msm: using for_each_set_bit to simplify the code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Linus Walleij committed Sep 18, 2012
1 parent 3113e67 commit 939d902
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpio/gpio-msm-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)

chained_irq_enter(chip, desc);

for (i = find_first_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS);
i < NR_GPIO_IRQS;
i = find_next_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS, i + 1)) {
for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS) {
if (readl(GPIO_INTR_STATUS(i)) & BIT(INTR_STATUS))
generic_handle_irq(msm_gpio_to_irq(&msm_gpio.gpio_chip,
i));
Expand Down

0 comments on commit 939d902

Please sign in to comment.