aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-bcm-kona.c
diff options
context:
space:
mode:
authorMarkus Mayer <markus.mayer@linaro.org>2013-11-21 18:12:46 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-11-27 09:01:03 -0500
commite2f0b00560729c47f39b2bc624eb93d82dc0e3e8 (patch)
tree20ed846bfb2fb8c21375642f62402bf04c2d33e5 /drivers/gpio/gpio-bcm-kona.c
parent2ba3154d9cb13697b97723cce75633b48adfe826 (diff)
gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
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>
Diffstat (limited to 'drivers/gpio/gpio-bcm-kona.c')
-rw-r--r--drivers/gpio/gpio-bcm-kona.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index 72c927dc3be1..54c18c220a60 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -158,7 +158,7 @@ static int bcm_kona_gpio_get(struct gpio_chip *chip, unsigned gpio)
158 spin_unlock_irqrestore(&kona_gpio->lock, flags); 158 spin_unlock_irqrestore(&kona_gpio->lock, flags);
159 159
160 /* return the specified bit status */ 160 /* return the specified bit status */
161 return !!(val & bit); 161 return !!(val & BIT(bit));
162} 162}
163 163
164static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 164static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)