Skip to content

Commit

Permalink
gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
Browse files Browse the repository at this point in the history
We need to return the corresponding bit for a particular GPIO. This bit
contains shift not mask.

Signed-off-by: Markus Mayer <[email protected]>
Reviewed-by: Tim Kryger <[email protected]>
Reviewed-by: Matt Porter <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
Markus Mayer authored and linusw committed Nov 27, 2013
1 parent 2ba3154 commit e2f0b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-bcm-kona.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e2f0b00

Please sign in to comment.