diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-11-06 09:03:47 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-11 13:06:06 -0500 |
commit | e93fa3f24353e45b189bae656ba000d0533777a3 (patch) | |
tree | c3139da5fd10fe3b68dbb97a59c919e2da1d9baf /drivers | |
parent | 167c1af9443757bb9d27ceff8ba4304302cb0651 (diff) |
gpiolib: remove duplicate pin range code
Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"
Introduced both of_gpiochip_remove_pin_range() and
gpiochip_remove_pin_ranges(). But the contents are exactly
the same so remove the OF one and rely on the range deletion
in the core.
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 220caa5978f7..67403e47e4dc 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c | |||
@@ -254,19 +254,8 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip) | |||
254 | } while (index++); | 254 | } while (index++); |
255 | } | 255 | } |
256 | 256 | ||
257 | static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) | ||
258 | { | ||
259 | struct gpio_pin_range *pin_range, *tmp; | ||
260 | |||
261 | list_for_each_entry_safe(pin_range, tmp, &chip->pin_ranges, node) { | ||
262 | list_del(&pin_range->node); | ||
263 | pinctrl_remove_gpio_range(pin_range->pctldev, | ||
264 | &pin_range->range); | ||
265 | } | ||
266 | } | ||
267 | #else | 257 | #else |
268 | static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {} | 258 | static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {} |
269 | static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) {} | ||
270 | #endif | 259 | #endif |
271 | 260 | ||
272 | void of_gpiochip_add(struct gpio_chip *chip) | 261 | void of_gpiochip_add(struct gpio_chip *chip) |
@@ -288,7 +277,7 @@ void of_gpiochip_add(struct gpio_chip *chip) | |||
288 | 277 | ||
289 | void of_gpiochip_remove(struct gpio_chip *chip) | 278 | void of_gpiochip_remove(struct gpio_chip *chip) |
290 | { | 279 | { |
291 | of_gpiochip_remove_pin_range(chip); | 280 | gpiochip_remove_pin_ranges(chip); |
292 | 281 | ||
293 | if (chip->of_node) | 282 | if (chip->of_node) |
294 | of_node_put(chip->of_node); | 283 | of_node_put(chip->of_node); |