]> Pileus Git - ~andy/linux/commitdiff
gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
authorMarkus Mayer <markus.mayer@linaro.org>
Thu, 21 Nov 2013 23:12:46 +0000 (15:12 -0800)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 27 Nov 2013 14:01:03 +0000 (15:01 +0100)
We need to return the corresponding bit for a particular GPIO. This bit
contains shift not mask.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-bcm-kona.c

index 72c927dc3be1b104c53e04bec683aa37c9c92343..54c18c220a60575d0ebc63f952937d816132f89c 100644 (file)
@@ -158,7 +158,7 @@ static int bcm_kona_gpio_get(struct gpio_chip *chip, unsigned gpio)
        spin_unlock_irqrestore(&kona_gpio->lock, flags);
 
        /* return the specified bit status */
-       return !!(val & bit);
+       return !!(val & BIT(bit));
 }
 
 static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)