diff options
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
| -rw-r--r-- | drivers/gpio/gpiolib-of.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index a71a54a3e3f7..5150df6cba08 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c | |||
| @@ -193,7 +193,7 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip) | |||
| 193 | if (!np) | 193 | if (!np) |
| 194 | return; | 194 | return; |
| 195 | 195 | ||
| 196 | do { | 196 | for (;; index++) { |
| 197 | ret = of_parse_phandle_with_args(np, "gpio-ranges", | 197 | ret = of_parse_phandle_with_args(np, "gpio-ranges", |
| 198 | "#gpio-range-cells", index, &pinspec); | 198 | "#gpio-range-cells", index, &pinspec); |
| 199 | if (ret) | 199 | if (ret) |
| @@ -222,8 +222,7 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip) | |||
| 222 | 222 | ||
| 223 | if (ret) | 223 | if (ret) |
| 224 | break; | 224 | break; |
| 225 | 225 | } | |
| 226 | } while (index++); | ||
| 227 | } | 226 | } |
| 228 | 227 | ||
| 229 | #else | 228 | #else |
