]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: gpio-kempld: Fix get_direction return value
authorMichael Brunner <mibru@gmx.de>
Mon, 11 May 2015 10:46:49 +0000 (12:46 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 12 May 2015 11:49:13 +0000 (13:49 +0200)
commit84f5dcdb4fa382add9b76060a78b4b8b64b2f7b2
tree0ed91fda8c78725fa92634a3128f3cf8ba159fd8
parent3823233a04513c180c3c64d4003530106e1422f8
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 <stable@vger.kernel.org> # v3.12+
Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com>
Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-kempld.c