[3.16.y-ckt stable] Patch "gpio: gpio-kempld: Fix get_direction return value" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Jun 4 13:09:51 UTC 2015
This is a note to let you know that I have just added a patch titled
gpio: gpio-kempld: Fix get_direction return value
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt13.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 48ff5b25391785450378dca98d363dd931db5554 Mon Sep 17 00:00:00 2001
From: Michael Brunner <mibru at gmx.de>
Date: Mon, 11 May 2015 12:46:49 +0200
Subject: 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 at henneberg-systemdesign.com>
Signed-off-by: Michael Brunner <michael.brunner at kontron.com>
Reviewed-by: Guenter Roeck <linux at roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/gpio/gpio-kempld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c
index 1e5e51987d31..b6ea5494ac78 100644
--- a/drivers/gpio/gpio-kempld.c
+++ b/drivers/gpio/gpio-kempld.c
@@ -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)
More information about the kernel-team
mailing list