This is a note to let you know that I've just added the patch titled
gpio: fix wrong checking condition for gpio range
to the 3.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gpio-fix-wrong-checking-condition-for-gpio-range.patch
and it can be found in the queue-3.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From ad4e1a7caf937ad395ced585ca85a7d14395dc80 Mon Sep 17 00:00:00 2001
From: Haojian Zhuang <[email protected]>
Date: Sun, 17 Feb 2013 19:42:48 +0800
Subject: gpio: fix wrong checking condition for gpio range
From: Haojian Zhuang <[email protected]>
commit ad4e1a7caf937ad395ced585ca85a7d14395dc80 upstream.
If index++ calculates from 0, the checking condition of "while
(index++)" fails & it doesn't check any more. It doesn't follow
the loop that used at here.
Replace it by endless loop at here. Then it keeps parsing
"gpio-ranges" property until it ends.
Signed-off-by: Haojian Zhuang <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Jonghwan Choi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpio/gpiolib-of.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -228,7 +228,7 @@ static void of_gpiochip_add_pin_range(st
if (!np)
return;
- do {
+ for (;; index++) {
ret = of_parse_phandle_with_args(np, "gpio-ranges",
"#gpio-range-cells", index, &pinspec);
if (ret)
@@ -257,8 +257,7 @@ static void of_gpiochip_add_pin_range(st
if (ret)
break;
-
- } while (index++);
+ }
}
#else
Patches currently in stable-queue which might be from [email protected]
are
queue-3.8/gpio-fix-wrong-checking-condition-for-gpio-range.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html