diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-10-05 22:42:06 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-11-05 10:54:42 +0300 |
commit | 48207d7595d2be604e21228e5a93aaff17e4b808 (patch) | |
tree | 874c0f976260e4e2db5da3d8512df60f9bcd3ba1 /drivers/gpio/gpiolib.c | |
parent | 25451945648af488077ed61afc59a79710422f31 (diff) | |
download | linux-48207d7595d2be604e21228e5a93aaff17e4b808.tar.xz |
gpio: drop devm_gpiochip_remove()
There is hardly any reason to call devm_gpiochip_remove() because the
driver core handles calling gpiochip_remove() automatically.
To make it harder to introduce new (and probably unneeded) callers, drop
the function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 230e41562462..9ccc096a0df7 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1524,6 +1524,7 @@ static int devm_gpio_chip_match(struct device *dev, void *res, void *data) return *r == data; } + /** * devm_gpiochip_add_data() - Resource manager gpiochip_add_data() * @dev: pointer to the device that gpio_chip belongs to. @@ -1564,23 +1565,6 @@ int devm_gpiochip_add_data(struct device *dev, struct gpio_chip *chip, EXPORT_SYMBOL_GPL(devm_gpiochip_add_data); /** - * devm_gpiochip_remove() - Resource manager of gpiochip_remove() - * @dev: device for which which resource was allocated - * @chip: the chip to remove - * - * A gpio_chip with any GPIOs still requested may not be removed. - */ -void devm_gpiochip_remove(struct device *dev, struct gpio_chip *chip) -{ - int ret; - - ret = devres_release(dev, devm_gpio_chip_release, - devm_gpio_chip_match, chip); - WARN_ON(ret); -} -EXPORT_SYMBOL_GPL(devm_gpiochip_remove); - -/** * gpiochip_find() - iterator for locating a specific gpio_chip * @data: data to pass to match function * @match: Callback function to check gpio_chip |