gpio: convert remaining users to gpiochip_add_data()
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 8 Dec 2015 09:41:44 +0000 (10:41 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 5 Jan 2016 10:21:20 +0000 (11:21 +0100)
For completion, sweep the floor from all gpiochip_add() usage so
we can remove that function and get rid of the function wrapper
gpiochip_add().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ich.c
drivers/gpio/gpio-iop.c
drivers/gpio/gpio-janz-ttl.c
drivers/gpio/gpio-ks8695.c
drivers/gpio/gpio-loongson.c
drivers/gpio/gpio-sa1100.c
drivers/gpio/gpio-tegra.c
drivers/gpio/gpio-twl6040.c
drivers/gpio/gpio-vr41xx.c
drivers/gpio/gpio-xtensa.c

index 8623d12e23c1b33a0ea6cd98e51b305ef11f3ac3..a4893386abbf6255417cddf0fe2664e5d30e88f2 100644 (file)
@@ -499,7 +499,7 @@ static int ichx_gpio_probe(struct platform_device *pdev)
 
 init:
        ichx_gpiolib_setup(&ichx_priv.chip);
-       err = gpiochip_add(&ichx_priv.chip);
+       err = gpiochip_add_data(&ichx_priv.chip, NULL);
        if (err) {
                pr_err("Failed to register GPIOs\n");
                goto add_err;
index 2ed0237a8bafbad50748b4cfa058124f53e42de0..fb65e5850e0c1f67a31b00a678fb1a4b35ccf3de 100644 (file)
@@ -114,7 +114,7 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
        if (IS_ERR(base))
                return PTR_ERR(base);
 
-       return gpiochip_add(&iop3xx_chip);
+       return gpiochip_add_data(&iop3xx_chip, NULL);
 }
 
 static struct platform_driver iop3xx_gpio_driver = {
index 236d322a0b5e51e4963834119d259fab5ba32af8..482aa0353868e3d1e1e395917e42cc7a4b077a6f 100644 (file)
@@ -182,7 +182,7 @@ static int ttl_probe(struct platform_device *pdev)
        gpio->base = -1;
        gpio->ngpio = 20;
 
-       ret = gpiochip_add(gpio);
+       ret = gpiochip_add_data(gpio, NULL);
        if (ret) {
                dev_err(dev, "unable to add GPIO chip\n");
                return ret;
index cc09b237e88c85bc49c72849b789f014764c9674..9f86ed9c753b5ecd64efcc74d2ac8e26551b0aa0 100644 (file)
@@ -234,7 +234,7 @@ static struct gpio_chip ks8695_gpio_chip = {
 /* Register the GPIOs */
 void ks8695_register_gpios(void)
 {
-       if (gpiochip_add(&ks8695_gpio_chip))
+       if (gpiochip_add_data(&ks8695_gpio_chip, NULL))
                printk(KERN_ERR "Unable to register core GPIOs\n");
 }
 
index ccc65a1aea88c4e1184d252d566611bfd73ac78f..92c4fe7b26773c9e7bf6eb8278a263b9b6e596d6 100644 (file)
@@ -110,6 +110,6 @@ static struct gpio_chip loongson_chip = {
 
 static int __init loongson_gpio_setup(void)
 {
-       return gpiochip_add(&loongson_chip);
+       return gpiochip_add_data(&loongson_chip, NULL);
 }
 postcore_initcall(loongson_gpio_setup);
index 9d590166e9523059913f6aa460f0c2efbcfcee73..0c99e8fb9af3822350ffd660ab64b678a11bac65 100644 (file)
@@ -238,7 +238,7 @@ void __init sa1100_init_gpio(void)
        GRER = 0;
        GEDR = -1;
 
-       gpiochip_add(&sa1100_gpio_chip);
+       gpiochip_add_data(&sa1100_gpio_chip, NULL);
 
        sa1100_gpio_irqdomain = irq_domain_add_simple(NULL,
                        28, IRQ_GPIO0,
index 896bf29776b093ee34efad4d4d29d073fda184b6..9a1a7e2ef38857c1f7f6e4ff4f352f17ce4751aa 100644 (file)
@@ -545,7 +545,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 
        tegra_gpio_chip.of_node = pdev->dev.of_node;
 
-       ret = gpiochip_add(&tegra_gpio_chip);
+       ret = gpiochip_add_data(&tegra_gpio_chip, NULL);
        if (ret < 0) {
                irq_domain_remove(irq_domain);
                return ret;
index 2da7c5f70034cd9970e15adec19636d0449771e0..8e9e9853f3bd4c9f92985a650dc07452bb0b72bd 100644 (file)
@@ -100,7 +100,7 @@ static int gpo_twl6040_probe(struct platform_device *pdev)
        twl6040gpo_chip.of_node = twl6040_core_dev->of_node;
 #endif
 
-       ret = gpiochip_add(&twl6040gpo_chip);
+       ret = gpiochip_add_data(&twl6040gpo_chip, NULL);
        if (ret < 0) {
                dev_err(&pdev->dev, "could not register gpiochip, %d\n", ret);
                twl6040gpo_chip.ngpio = 0;
index 1947531b7cf5ee36eb87ae785f1ea039cbf24885..ac8deb01f6f63b274f3e496e61ec99b53e485e6d 100644 (file)
@@ -544,7 +544,7 @@ static int giu_probe(struct platform_device *pdev)
 
        vr41xx_gpio_chip.parent = &pdev->dev;
 
-       ret = gpiochip_add(&vr41xx_gpio_chip);
+       ret = gpiochip_add_data(&vr41xx_gpio_chip, NULL);
        if (!ret) {
                iounmap(giu_base);
                return -ENODEV;
index 93ec95df67a3e64c32bc0245244219eb31a77f9f..f16c0427952e16e435af4734fa7f3f7d8063cd5c 100644 (file)
@@ -148,10 +148,10 @@ static int xtensa_gpio_probe(struct platform_device *pdev)
 {
        int ret;
 
-       ret = gpiochip_add(&impwire_chip);
+       ret = gpiochip_add_data(&impwire_chip, NULL);
        if (ret)
                return ret;
-       return gpiochip_add(&expstate_chip);
+       return gpiochip_add_data(&expstate_chip, NULL);
 }
 
 static struct platform_driver xtensa_gpio_driver = {