gpio: msm-v1: make boolean argument more obvious
authorDaniel Thompson <daniel.thompson@linaro.org>
Fri, 24 Oct 2014 14:29:57 +0000 (15:29 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 29 Oct 2014 13:46:21 +0000 (14:46 +0100)
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>
drivers/gpio/gpio-msm-v1.c

index 73b7396..997e61e 100644 (file)
@@ -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;
 }