diff options
author | Markus Mayer <markus.mayer@linaro.org> | 2013-11-22 03:12:46 +0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-11-27 18:01:03 +0400 |
commit | e2f0b00560729c47f39b2bc624eb93d82dc0e3e8 (patch) | |
tree | 20ed846bfb2fb8c21375642f62402bf04c2d33e5 /drivers/gpio | |
parent | 2ba3154d9cb13697b97723cce75633b48adfe826 (diff) | |
download | linux-e2f0b00560729c47f39b2bc624eb93d82dc0e3e8.tar.xz |
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')
-rw-r--r-- | drivers/gpio/gpio-bcm-kona.c | 2 |
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) 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) |