mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
gpio: gpio-kempld: Fix get_direction return value
This patch fixes an inverted return value of the gpio get_direction function. The wrong value causes the direction sysfs entry and GPIO debugfs file to indicate incorrect GPIO direction settings. In some cases it also prevents setting GPIO output values. The problem is also present in all other stable kernel versions since linux-3.12. Cc: Stable <[email protected]> # v3.12+ Reported-by: Jochen Henneberg <[email protected]> Signed-off-by: Michael Brunner <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
6d86750ce6
commit
f230e8ffc0
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ static int kempld_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
|||
= container_of(chip, struct kempld_gpio_data, chip);
|
||||
struct kempld_device_data *pld = gpio->pld;
|
||||
|
||||
return kempld_gpio_get_bit(pld, KEMPLD_GPIO_DIR_NUM(offset), offset);
|
||||
return !kempld_gpio_get_bit(pld, KEMPLD_GPIO_DIR_NUM(offset), offset);
|
||||
}
|
||||
|
||||
static int kempld_gpio_pincount(struct kempld_device_data *pld)
|
||||
|
|
|
|||
Loading…
Reference in a new issue