提交 e2f0b005 编写于 作者: M Markus Mayer 提交者: Linus Walleij

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: NMarkus Mayer <markus.mayer@linaro.org>
Reviewed-by: NTim Kryger <tim.kryger@linaro.org>
Reviewed-by: NMatt Porter <matt.porter@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 2ba3154d
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册