gpio: twl4030: Drop platform teardown callback
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 14 Jun 2022 15:23:38 +0000 (17:23 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 19 Jul 2022 07:56:51 +0000 (09:56 +0200)
There is no machine providing a teardown callback, so drop the unused
code.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-twl4030.c
include/linux/mfd/twl.h

index de24972..e2cb7cb 100644 (file)
@@ -593,18 +593,7 @@ out:
 /* Cannot use as gpio_twl4030_probe() calls us */
 static int gpio_twl4030_remove(struct platform_device *pdev)
 {
-       struct twl4030_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct gpio_twl4030_priv *priv = platform_get_drvdata(pdev);
-       int status;
-
-       if (pdata && pdata->teardown) {
-               status = pdata->teardown(&pdev->dev, priv->gpio_chip.base,
-                                        TWL4030_GPIO_MAX);
-               if (status) {
-                       dev_dbg(&pdev->dev, "teardown --> %d\n", status);
-                       return status;
-               }
-       }
 
        gpiochip_remove(&priv->gpio_chip);
 
index 8871cc5..c8cd317 100644 (file)
@@ -594,8 +594,6 @@ struct twl4030_gpio_platform_data {
 
        int             (*setup)(struct device *dev,
                                unsigned gpio, unsigned ngpio);
-       int             (*teardown)(struct device *dev,
-                               unsigned gpio, unsigned ngpio);
 };
 
 struct twl4030_madc_platform_data {