]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
gpio: tc3589x: get rid of platform data
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 15 Dec 2014 09:39:47 +0000 (10:39 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Jan 2015 16:23:19 +0000 (17:23 +0100)
This device is only used from the device tree, and the startup()
and remove() callbacks are not used anywhere in the kernel, so
retire them and the pdata altogether.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-tc3589x.c
include/linux/mfd/tc3589x.h

index abdcf58935f56c8c129b3b8d3f89a9e27c15a37a..11aed26710655073af1e3887a417572f80d27214 100644 (file)
@@ -232,16 +232,13 @@ static irqreturn_t tc3589x_gpio_irq(int irq, void *dev)
 static int tc3589x_gpio_probe(struct platform_device *pdev)
 {
        struct tc3589x *tc3589x = dev_get_drvdata(pdev->dev.parent);
-       struct tc3589x_gpio_platform_data *pdata;
        struct device_node *np = pdev->dev.of_node;
        struct tc3589x_gpio *tc3589x_gpio;
        int ret;
        int irq;
 
-       pdata = tc3589x->pdata->gpio;
-
-       if (!(pdata || np)) {
-               dev_err(&pdev->dev, "No platform data or Device Tree found\n");
+       if (!np) {
+               dev_err(&pdev->dev, "No Device Tree node found\n");
                return -EINVAL;
        }
 
@@ -305,9 +302,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
                                     irq,
                                     NULL);
 
-       if (pdata && pdata->setup)
-               pdata->setup(tc3589x, tc3589x_gpio->chip.base);
-
        platform_set_drvdata(pdev, tc3589x_gpio);
 
        return 0;
@@ -316,11 +310,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
 static int tc3589x_gpio_remove(struct platform_device *pdev)
 {
        struct tc3589x_gpio *tc3589x_gpio = platform_get_drvdata(pdev);
-       struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
-       struct tc3589x_gpio_platform_data *pdata = tc3589x->pdata->gpio;
-
-       if (pdata && pdata->remove)
-               pdata->remove(tc3589x, tc3589x_gpio->chip.base);
 
        gpiochip_remove(&tc3589x_gpio->chip);
 
index e1c12d84c26af4c6f0a7bdcb7e7d4df4bf4b81da..c203c9c56776268913415993e3053a15b8665c24 100644 (file)
@@ -162,25 +162,13 @@ struct tc3589x_keypad_platform_data {
        bool                    no_autorepeat;
 };
 
-/**
- * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data
- * @setup: callback for board-specific initialization
- * @remove: callback for board-specific teardown
- */
-struct tc3589x_gpio_platform_data {
-       void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base);
-       void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base);
-};
-
 /**
  * struct tc3589x_platform_data - TC3589x platform data
  * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*)
- * @gpio: GPIO-specific platform data
  * @keypad: keypad-specific platform data
  */
 struct tc3589x_platform_data {
        unsigned int block;
-       struct tc3589x_gpio_platform_data *gpio;
        const struct tc3589x_keypad_platform_data *keypad;
 };