| From f1df6f59c8d82463c524d410ef5b878ae3aeb278 Mon Sep 17 00:00:00 2001 |
| From: Stephen Warren <swarren@nvidia.com> |
| Date: Wed, 14 Aug 2013 15:27:12 -0600 |
| Subject: gpio: implement gpio-ranges binding document fix |
| |
| Use the new of_parse_phandle_with_fixed_args() to implement the |
| corrected gpio-ranges DT property definition. |
| |
| Signed-off-by: Stephen Warren <swarren@nvidia.com> |
| Acked-by: Mark Rutland <mark.rutland@arm.com> |
| Acked-by: Linus Walleij <linus.walleij@linaro.org> |
| Signed-off-by: Grant Likely <grant.likely@linaro.org> |
| (cherry picked from commit d9fe0039c4247383c2783923a3860227813b4d82) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/gpio/gpiolib-of.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| --- a/drivers/gpio/gpiolib-of.c |
| +++ b/drivers/gpio/gpiolib-of.c |
| @@ -201,8 +201,8 @@ static void of_gpiochip_add_pin_range(st |
| return; |
| |
| for (;; index++) { |
| - ret = of_parse_phandle_with_args(np, "gpio-ranges", |
| - "#gpio-range-cells", index, &pinspec); |
| + ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, |
| + index, &pinspec); |
| if (ret) |
| break; |
| |