diff mbox

GPIO: clps711x: Fix return value for gpio_clps711x_get

Message ID 1351061937-11629-1-git-send-email-shc_work@mail.ru (mailing list archive)
State New, archived
Headers show

Commit Message

Alexander Shiyan Oct. 24, 2012, 6:58 a.m. UTC
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/gpio/gpio-clps711x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Linus Walleij Oct. 24, 2012, 8:03 a.m. UTC | #1
On Wed, Oct 24, 2012 at 8:58 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/gpio/gpio-clps711x.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, patch applied.

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/drivers/gpio/gpio-clps711x.c b/drivers/gpio/gpio-clps711x.c
index ea21822..0753b3a 100644
--- a/drivers/gpio/gpio-clps711x.c
+++ b/drivers/gpio/gpio-clps711x.c
@@ -47,7 +47,7 @@  static void __iomem *clps711x_pdirs[] = {
 
 static int gpio_clps711x_get(struct gpio_chip *chip, unsigned offset)
 {
-	return !!readb(clps711x_port(chip)) & (1 << offset);
+	return !!(readb(clps711x_port(chip)) & (1 << offset));
 }
 
 static void gpio_clps711x_set(struct gpio_chip *chip, unsigned offset,