From: Linus Walleij Date: Tue, 6 Nov 2012 14:15:44 +0000 (+0100) Subject: gpiolib: call pin removal in chip removal function X-Git-Tag: next-20121109~29^2~3^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cdf6c6cdf9bba05f3610e3fb145a40f6209f82a8;p=karo-tx-linux.git 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 Reviewed-by: Viresh Kumar Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 10fc9c33e366..fd7280faf883 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1125,6 +1125,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++) {