summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarkus Mayer <markus.mayer@linaro.org>2013-11-21 15:12:46 -0800
committerLinus Walleij <linus.walleij@linaro.org>2013-11-27 15:01:03 +0100
commite2f0b00560729c47f39b2bc624eb93d82dc0e3e8 (patch)
tree20ed846bfb2fb8c21375642f62402bf04c2d33e5 /drivers
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')
-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)
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)