]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 3 Jun 2015 09:33:12 +0000 (11:33 +0200)
commit9175da111a96a52fa90f7396f3fc9e0e170d85bc
tree077fda43699973053ba999c2d99ddfdff86e1e7d
parent2cf954cd3fb3047fc81e822f63d4067d4fffe01a
gpio: gpio-kempld: Fix get_direction return value

commit f230e8ffc03f17bd9d6b90ea890b8252a8cc1821 upstream.

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.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpio/gpio-kempld.c