Message ID | 1385075566-23989-1-git-send-email-markus.mayer@linaro.org |
---|---|
State | Accepted |
Commit | e2f0b00560729c47f39b2bc624eb93d82dc0e3e8 |
Headers | show |
On Fri, Nov 22, 2013 at 12:12 AM, Markus Mayer <markus.mayer@linaro.org> wrote: > 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> Patch applied for fixes, thanks! Yours, Linus Walleij
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index 72c927d..54c18c2 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)