diff options
| author | Markus Mayer <markus.mayer@linaro.org> | 2013-11-21 18:12:46 -0500 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2013-11-27 09:01:03 -0500 |
| commit | e2f0b00560729c47f39b2bc624eb93d82dc0e3e8 (patch) | |
| tree | 20ed846bfb2fb8c21375642f62402bf04c2d33e5 | |
| parent | 2ba3154d9cb13697b97723cce75633b48adfe826 (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>
| -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) | |||
| 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 | ||
| 164 | static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) | 164 | static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) |
