Commit e93fa3f2 authored by Linus Walleij's avatar Linus Walleij

gpiolib: remove duplicate pin range code

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Introduced both of_gpiochip_remove_pin_range() and
gpiochip_remove_pin_ranges(). But the contents are exactly
the same so remove the OF one and rely on the range deletion
in the core.
Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 167c1af9
...@@ -254,19 +254,8 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip) ...@@ -254,19 +254,8 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
} while (index++); } while (index++);
} }
static void of_gpiochip_remove_pin_range(struct gpio_chip *chip)
{
struct gpio_pin_range *pin_range, *tmp;
list_for_each_entry_safe(pin_range, tmp, &chip->pin_ranges, node) {
list_del(&pin_range->node);
pinctrl_remove_gpio_range(pin_range->pctldev,
&pin_range->range);
}
}
#else #else
static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {} static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {}
static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) {}
#endif #endif
void of_gpiochip_add(struct gpio_chip *chip) void of_gpiochip_add(struct gpio_chip *chip)
...@@ -288,7 +277,7 @@ void of_gpiochip_add(struct gpio_chip *chip) ...@@ -288,7 +277,7 @@ void of_gpiochip_add(struct gpio_chip *chip)
void of_gpiochip_remove(struct gpio_chip *chip) void of_gpiochip_remove(struct gpio_chip *chip)
{ {
of_gpiochip_remove_pin_range(chip); gpiochip_remove_pin_ranges(chip);
if (chip->of_node) if (chip->of_node)
of_node_put(chip->of_node); of_node_put(chip->of_node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment