]> 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)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 10 Jun 2015 17:42:28 +0000 (13:42 -0400)
commitbfea0f5c4ba46663fb16ffdab09e57b670e7edcf
tree1c6f731686619143525a4a27fdc321b8ffc6ccee
parent7ca7760adbe56a816c44438d6a3a0328506ea585
gpio: gpio-kempld: Fix get_direction return value

[ Upstream commit f230e8ffc03f17bd9d6b90ea890b8252a8cc1821 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpio/gpio-kempld.c