summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorLinus Walleij2012-11-06 15:15:44 +0100
committerLinus Walleij2012-11-11 19:06:06 +0100
commit9ef0d6f7628bdcb5cc3c11623930f2527a3881a0 (patch)
tree890ee860dbef20b3b4de059f2799ff36f8afaa33 /drivers/gpio/gpiolib.c
parentgpiolib: remove duplicate pin range code (diff)
downloadkernel-qcow2-linux-9ef0d6f7628bdcb5cc3c11623930f2527a3881a0.tar.gz
kernel-qcow2-linux-9ef0d6f7628bdcb5cc3c11623930f2527a3881a0.tar.xz
kernel-qcow2-linux-9ef0d6f7628bdcb5cc3c11623930f2527a3881a0.zip
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)
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++) {