Skip to content

Commit

Permalink
gpio: msm-v1: make boolean argument more obvious
Browse files Browse the repository at this point in the history
irq_set_irq_wake() treats its second argument as a boolean. It is much
easier to read code when constant booleans are either 0 or 1!

This particular line of code distracted me somewhat when I was doing a bit of
work in a code browser since it (spuriously) got me worried that I had
misunderstood how irq_set_irq_wake() worked.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
[jkosina@suse.cz: alter subject to be more descriptive]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Daniel Thompson authored and Jiri Kosina committed Oct 29, 2014
1 parent 8b648f1 commit 5887010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-msm-v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static int gpio_msm_v1_probe(struct platform_device *pdev)
irq_set_chained_handler(irq1, msm_gpio_irq_handler);
irq_set_chained_handler(irq2, msm_gpio_irq_handler);
irq_set_irq_wake(irq1, 1);
irq_set_irq_wake(irq2, 2);
irq_set_irq_wake(irq2, 1);
return 0;
}

Expand Down

0 comments on commit 5887010

Please sign in to comment.