gpiolib: call pin removal in chip removal function
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 6 Nov 2012 14:15:44 +0000 (15:15 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 11 Nov 2012 18:06:06 +0000 (19:06 +0100)
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>
drivers/gpio/gpiolib.c

index 1e1a7cabc57e1d34bec97a38e5c073f4f776a13e..bcf9b9914fb7176db78c4d5cc9f1d89469efcb42 100644 (file)
@@ -1127,6 +1127,7 @@ int gpiochip_remove(struct gpio_chip *chip)
 
        spin_lock_irqsave(&gpio_lock, flags);
 
+       gpiochip_remove_pin_ranges(chip);
        of_gpiochip_remove(chip);
 
        for (id = chip->base; id < chip->base + chip->ngpio; id++) {