gpio: em: use BIT() macro instead of shifting bits
authorJavier Martinez Canillas <javier@dowhile0.org>
Sun, 27 Apr 2014 00:00:47 +0000 (02:00 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 3 May 2014 19:15:52 +0000 (12:15 -0700)
Using the BIT() macro instead of shifting bits
makes the code less error prone and also more readable.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-em.c

index 8765bd6f48e12dd177de6a2e42ab2a8df8eecd7c..1da1aa418d7e264855ef495ddbeb60f3e4053a32 100644 (file)
@@ -212,7 +212,7 @@ static void __em_gio_set(struct gpio_chip *chip, unsigned int reg,
 {
        /* upper 16 bits contains mask and lower 16 actual value */
        em_gio_write(gpio_to_priv(chip), reg,
-                    (1 << (shift + 16)) | (value << shift));
+                    (BIT(shift + 16)) | (value << shift));
 }
 
 static void em_gio_set(struct gpio_chip *chip, unsigned offset, int value)
This page took 0.04022 seconds and 5 git commands to generate.