Skip to content

Commit

Permalink
gpiolib: call pin removal in chip removal function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Walleij committed Nov 11, 2012
1 parent e93fa3f commit 9ef0d6f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 9ef0d6f

Please sign in to comment.