aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-11-06 09:15:44 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-11 13:06:06 -0500
commit9ef0d6f7628bdcb5cc3c11623930f2527a3881a0 (patch)
tree890ee860dbef20b3b4de059f2799ff36f8afaa33 /drivers/gpio/gpiolib.c
parente93fa3f24353e45b189bae656ba000d0533777a3 (diff)
gpiolib: call pin removal in chip removal function
This makes us call gpiochio_remove_pin_ranges() in the gpiochip_remove() function, so we get rid of ranges when freeing the chip. 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/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 1e1a7cabc57e..bcf9b9914fb7 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1127,6 +1127,7 @@ int gpiochip_remove(struct gpio_chip *chip)
1127 1127
1128 spin_lock_irqsave(&gpio_lock, flags); 1128 spin_lock_irqsave(&gpio_lock, flags);
1129 1129
1130 gpiochip_remove_pin_ranges(chip);
1130 of_gpiochip_remove(chip); 1131 of_gpiochip_remove(chip);
1131 1132
1132 for (id = chip->base; id < chip->base + chip->ngpio; id++) { 1133 for (id = chip->base; id < chip->base + chip->ngpio; id++) {