Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339526 > unrolled thread

[PATCH 00/61] gpio: Add and use devm_gpiochip_add_data()

Started byLaxman Dewangan <ldewangan@nvidia.com>
First post2016-02-22 15:30 +0100
Last post2016-02-22 15:50 +0100
Articles 20 on this page of 55 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 35/61] gpio: palmas: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 21/61] gpio: generic: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 50/61] gpio: tps65912: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 03/61] gpio: Add missing devm_gpio_ wrapper in devres.txt Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 11/61] gpio: bcm-kona: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
      Re: [PATCH 11/61] gpio: bcm-kona: Use devm_gpiochip_add_data() for  gpio registration Ray Jui <ray.jui@broadcom.com> - 2016-02-22 18:20 +0100
    [PATCH 39/61] gpio: spear-spics: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 29/61] gpio: moxart: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 28/61] gpio: mc9s08dz60: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 51/61] gpio: ts4800: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 49/61] gpio: tps65910: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 60/61] gpio: xgene-sb: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 12/61] gpio: clps711x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 27/61] gpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 06/61] gpio: adp5520: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 31/61] gpio: mxc: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 44/61] gpio: tb10x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 58/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
      Re: [PATCH 58/61] gpio: wm8350: Use devm_gpiochip_add_data() for  gpio registration Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-02-22 17:40 +0100
    [PATCH 40/61] gpio: sta2x11: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
      Re: [PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio  registration Thierry Reding <thierry.reding@gmail.com> - 2016-02-23 17:40 +0100
    [PATCH 18/61] gpio: ep93xx: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 25/61] gpio: lp3943: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 33/61] gpio: pca953x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 17/61] gpio: dln2: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 05/61] gpio: adnp: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 32/61] gpio: octeon: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
      Re: [PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for  gpio registration Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-02-22 17:40 +0100
    [PATCH 22/61] gpio: iop: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 55/61] gpio: viperboard: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 43/61] gpio: syscon: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 15/61] gpio: da9052: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 02/61] gpio: Add resource management devm_gpio_chip_{add_data,remove} Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 34/61] gpio: pcf857x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
      Re: [PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for  gpio registration Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-02-22 17:40 +0100
    [PATCH 16/61] gpio: da9055: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
    [PATCH 20/61] gpio: ge: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 38/61] gpio: sch: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 26/61] gpio: lpc32xx: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 19/61] gpio: f7188x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 45/61] gpio: tc3589x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 48/61] gpio: tps6586x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 41/61] gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 36/61] gpio: rc5t583: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    [PATCH 23/61] gpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
    Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Linus Walleij <linus.walleij@linaro.org> - 2016-02-22 15:50 +0100
      Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-23 10:20 +0100
        Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-23 16:30 +0100
          Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Linus Walleij <linus.walleij@linaro.org> - 2016-02-25 14:30 +0100
            Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-28 15:50 +0100
    [PATCH 07/61] gpio: adp5588: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:50 +0100

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#1339545 — [PATCH 40/61] gpio: sta2x11: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 40/61] gpio: sta2x11: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-93@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-sta2x11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c
index 83af1cb..0d5b8c5 100644
--- a/drivers/gpio/gpio-sta2x11.c
+++ b/drivers/gpio/gpio-sta2x11.c
@@ -409,7 +409,7 @@ static int gsta_probe(struct platform_device *dev)
 		goto err_free_descs;
 	}
 
-	err = gpiochip_add_data(&chip->gpio, chip);
+	err = devm_gpiochip_add_data(&dev->dev, &chip->gpio, chip);
 	if (err < 0) {
 		dev_err(&dev->dev, "sta2x11 gpio: Can't register (%i)\n",
 			-err);
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339546 — [PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-97@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
---
 drivers/gpio/gpio-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 9a1a7e2..790bb11 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -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_data(&tegra_gpio_chip, NULL);
+	ret = devm_gpiochip_add_data(&pdev->dev, &tegra_gpio_chip, NULL);
 	if (ret < 0) {
 		irq_domain_remove(irq_domain);
 		return ret;
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1340853 — Re: [PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration

FromThierry Reding <thierry.reding@gmail.com>
Date2016-02-23 17:40 +0100
SubjectRe: [PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r5oag-7Zs-57@gated-at.bofh.it>
In reply to#1339546

[Multipart message — attachments visible in raw view] — view raw

On Mon, Feb 22, 2016 at 07:38:35PM +0530, Laxman Dewangan wrote:
> Use devm_gpiochip_add_data() for GPIO registration.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> ---
>  drivers/gpio/gpio-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 9a1a7e2..790bb11 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -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_data(&tegra_gpio_chip, NULL);
> +	ret = devm_gpiochip_add_data(&pdev->dev, &tegra_gpio_chip, NULL);
>  	if (ret < 0) {
>  		irq_domain_remove(irq_domain);
>  		return ret;

It's slightly redundant to do this because the driver probe will never
fail after this point and the driver can't be unloaded, so there's no
way that the GPIO chip would ever be removed.

But in the interest of consistency I have no objections to doing this.
It might also happen that, eventually, we might turn this into a proper
driver, at which point this would come in useful.

Acked-by: Thierry Reding <treding@nvidia.com>

[toc] | [prev] | [next] | [standalone]


#1339547 — [PATCH 18/61] gpio: ep93xx: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 18/61] gpio: ep93xx: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-95@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-ep93xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index ad27907..d054219 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -339,7 +339,7 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev,
 		gc->to_irq = ep93xx_gpio_to_irq;
 	}
 
-	return gpiochip_add_data(gc, NULL);
+	return devm_gpiochip_add_data(dev, gc, NULL);
 }
 
 static int ep93xx_gpio_probe(struct platform_device *pdev)
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339548 — [PATCH 25/61] gpio: lp3943: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 25/61] gpio: lp3943: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-101@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-lp3943.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-lp3943.c b/drivers/gpio/gpio-lp3943.c
index 1c8e2ae..6dc6725 100644
--- a/drivers/gpio/gpio-lp3943.c
+++ b/drivers/gpio/gpio-lp3943.c
@@ -204,15 +204,8 @@ static int lp3943_gpio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, lp3943_gpio);
 
-	return gpiochip_add_data(&lp3943_gpio->chip, lp3943_gpio);
-}
-
-static int lp3943_gpio_remove(struct platform_device *pdev)
-{
-	struct lp3943_gpio *lp3943_gpio = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&lp3943_gpio->chip);
-	return 0;
+	return devm_gpiochip_add_data(&pdev->dev, &lp3943_gpio->chip,
+				      lp3943_gpio);
 }
 
 static const struct of_device_id lp3943_gpio_of_match[] = {
@@ -223,7 +216,6 @@ MODULE_DEVICE_TABLE(of, lp3943_gpio_of_match);
 
 static struct platform_driver lp3943_gpio_driver = {
 	.probe = lp3943_gpio_probe,
-	.remove = lp3943_gpio_remove,
 	.driver = {
 		.name = "lp3943-gpio",
 		.of_match_table = lp3943_gpio_of_match,
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339549 — [PATCH 33/61] gpio: pca953x: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 33/61] gpio: pca953x: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-99@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-pca953x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 23196c5..b7fe5d5 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -754,7 +754,7 @@ static int pca953x_probe(struct i2c_client *client,
 	if (ret)
 		return ret;
 
-	ret = gpiochip_add_data(&chip->gpio_chip, chip);
+	ret = devm_gpiochip_add_data(&client->dev, &chip->gpio_chip, chip);
 	if (ret)
 		return ret;
 
@@ -789,8 +789,6 @@ static int pca953x_remove(struct i2c_client *client)
 		}
 	}
 
-	gpiochip_remove(&chip->gpio_chip);
-
 	return 0;
 }
 
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339550 — [PATCH 17/61] gpio: dln2: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 17/61] gpio: dln2: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-105@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-dln2.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/gpio/gpio-dln2.c b/drivers/gpio/gpio-dln2.c
index e11a7d1..f7a60a4 100644
--- a/drivers/gpio/gpio-dln2.c
+++ b/drivers/gpio/gpio-dln2.c
@@ -479,40 +479,32 @@ static int dln2_gpio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, dln2);
 
-	ret = gpiochip_add_data(&dln2->gpio, dln2);
+	ret = devm_gpiochip_add_data(dev, &dln2->gpio, dln2);
 	if (ret < 0) {
 		dev_err(dev, "failed to add gpio chip: %d\n", ret);
-		goto out;
+		return ret;
 	}
 
 	ret = gpiochip_irqchip_add(&dln2->gpio, &dln2_gpio_irqchip, 0,
 				   handle_simple_irq, IRQ_TYPE_NONE);
 	if (ret < 0) {
 		dev_err(dev, "failed to add irq chip: %d\n", ret);
-		goto out_gpiochip_remove;
+		return ret;
 	}
 
 	ret = dln2_register_event_cb(pdev, DLN2_GPIO_CONDITION_MET_EV,
 				     dln2_gpio_event);
 	if (ret) {
 		dev_err(dev, "failed to register event cb: %d\n", ret);
-		goto out_gpiochip_remove;
+		return ret;
 	}
 
 	return 0;
-
-out_gpiochip_remove:
-	gpiochip_remove(&dln2->gpio);
-out:
-	return ret;
 }
 
 static int dln2_gpio_remove(struct platform_device *pdev)
 {
-	struct dln2_gpio *dln2 = platform_get_drvdata(pdev);
-
 	dln2_unregister_event_cb(pdev, DLN2_GPIO_CONDITION_MET_EV);
-	gpiochip_remove(&dln2->gpio);
 
 	return 0;
 }
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339551 — [PATCH 05/61] gpio: adnp: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 05/61] gpio: adnp: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-103@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from error path.

Also remove the need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
---
 drivers/gpio/gpio-adnp.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c
index fb5b47b..8ff7b0d 100644
--- a/drivers/gpio/gpio-adnp.c
+++ b/drivers/gpio/gpio-adnp.c
@@ -265,7 +265,7 @@ static int adnp_gpio_setup(struct adnp *adnp, unsigned int num_gpios)
 	chip->of_node = chip->parent->of_node;
 	chip->owner = THIS_MODULE;
 
-	err = gpiochip_add_data(chip, adnp);
+	err = devm_gpiochip_add_data(&adnp->client->dev, chip, adnp);
 	if (err)
 		return err;
 
@@ -520,14 +520,6 @@ static int adnp_i2c_probe(struct i2c_client *client,
 	return 0;
 }
 
-static int adnp_i2c_remove(struct i2c_client *client)
-{
-	struct adnp *adnp = i2c_get_clientdata(client);
-
-	gpiochip_remove(&adnp->gpio);
-	return 0;
-}
-
 static const struct i2c_device_id adnp_i2c_id[] = {
 	{ "gpio-adnp" },
 	{ },
@@ -546,7 +538,6 @@ static struct i2c_driver adnp_i2c_driver = {
 		.of_match_table = adnp_of_match,
 	},
 	.probe = adnp_i2c_probe,
-	.remove = adnp_i2c_remove,
 	.id_table = adnp_i2c_id,
 };
 module_i2c_driver(adnp_i2c_driver);
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339552 — [PATCH 32/61] gpio: octeon: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 32/61] gpio: octeon: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-109@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-octeon.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 7665ebc..47aead1 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -117,7 +117,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
 	chip->get = octeon_gpio_get;
 	chip->direction_output = octeon_gpio_dir_out;
 	chip->set = octeon_gpio_set;
-	err = gpiochip_add_data(chip, gpio);
+	err = devm_gpiochip_add_data(&pdev->dev, chip, gpio);
 	if (err)
 		goto out;
 
@@ -126,13 +126,6 @@ out:
 	return err;
 }
 
-static int octeon_gpio_remove(struct platform_device *pdev)
-{
-	struct gpio_chip *chip = dev_get_platdata(&pdev->dev);
-	gpiochip_remove(chip);
-	return 0;
-}
-
 static struct of_device_id octeon_gpio_match[] = {
 	{
 		.compatible = "cavium,octeon-3860-gpio",
@@ -147,7 +140,6 @@ static struct platform_driver octeon_gpio_driver = {
 		.of_match_table = octeon_gpio_match,
 	},
 	.probe		= octeon_gpio_probe,
-	.remove		= octeon_gpio_remove,
 };
 
 module_platform_driver(octeon_gpio_driver);
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339553 — [PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEV-741-107@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: patches@opensource.wolfsonmicro.com
---
 drivers/gpio/gpio-wm831x.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-wm831x.c b/drivers/gpio/gpio-wm831x.c
index 9839007..18cb0f5 100644
--- a/drivers/gpio/gpio-wm831x.c
+++ b/drivers/gpio/gpio-wm831x.c
@@ -259,7 +259,8 @@ static int wm831x_gpio_probe(struct platform_device *pdev)
 	else
 		wm831x_gpio->gpio_chip.base = -1;
 
-	ret = gpiochip_add_data(&wm831x_gpio->gpio_chip, wm831x_gpio);
+	ret = devm_gpiochip_add_data(&pdev->dev, &wm831x_gpio->gpio_chip,
+				     wm831x_gpio);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret);
 		return ret;
@@ -270,19 +271,10 @@ static int wm831x_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int wm831x_gpio_remove(struct platform_device *pdev)
-{
-	struct wm831x_gpio *wm831x_gpio = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&wm831x_gpio->gpio_chip);
-	return 0;
-}
-
 static struct platform_driver wm831x_gpio_driver = {
 	.driver.name	= "wm831x-gpio",
 	.driver.owner	= THIS_MODULE,
 	.probe		= wm831x_gpio_probe,
-	.remove		= wm831x_gpio_remove,
 };
 
 static int __init wm831x_gpio_init(void)
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339712 — Re: [PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration

FromCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date2016-02-22 17:40 +0100
SubjectRe: [PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r51GH-8uQ-39@gated-at.bofh.it>
In reply to#1339553
On Mon, Feb 22, 2016 at 07:38:46PM +0530, Laxman Dewangan wrote:
> Use devm_gpiochip_add_data() for GPIO registration and remove the
> need of driver callback .remove.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: patches@opensource.wolfsonmicro.com
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

[toc] | [prev] | [next] | [standalone]


#1339554 — [PATCH 22/61] gpio: iop: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 22/61] gpio: iop: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-113@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-iop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-iop.c b/drivers/gpio/gpio-iop.c
index fb65e58..860c535 100644
--- a/drivers/gpio/gpio-iop.c
+++ b/drivers/gpio/gpio-iop.c
@@ -114,7 +114,7 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-	return gpiochip_add_data(&iop3xx_chip, NULL);
+	return devm_gpiochip_add_data(&pdev->dev, &iop3xx_chip, NULL);
 }
 
 static struct platform_driver iop3xx_gpio_driver = {
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339555 — [PATCH 55/61] gpio: viperboard: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 55/61] gpio: viperboard: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-111@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-viperboard.c | 24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c
index 1170b03..dec47aa 100644
--- a/drivers/gpio/gpio-viperboard.c
+++ b/drivers/gpio/gpio-viperboard.c
@@ -410,10 +410,10 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
 	vb_gpio->gpioa.get = vprbrd_gpioa_get;
 	vb_gpio->gpioa.direction_input = vprbrd_gpioa_direction_input;
 	vb_gpio->gpioa.direction_output = vprbrd_gpioa_direction_output;
-	ret = gpiochip_add_data(&vb_gpio->gpioa, vb_gpio);
+	ret = devm_gpiochip_add_data(&pdev->dev, &vb_gpio->gpioa, vb_gpio);
 	if (ret < 0) {
 		dev_err(vb_gpio->gpioa.parent, "could not add gpio a");
-		goto err_gpioa;
+		return ret;
 	}
 
 	/* registering gpio b */
@@ -427,37 +427,21 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
 	vb_gpio->gpiob.get = vprbrd_gpiob_get;
 	vb_gpio->gpiob.direction_input = vprbrd_gpiob_direction_input;
 	vb_gpio->gpiob.direction_output = vprbrd_gpiob_direction_output;
-	ret = gpiochip_add_data(&vb_gpio->gpiob, vb_gpio);
+	ret = devm_gpiochip_add_data(&pdev->dev, &vb_gpio->gpiob, vb_gpio);
 	if (ret < 0) {
 		dev_err(vb_gpio->gpiob.parent, "could not add gpio b");
-		goto err_gpiob;
+		return ret;
 	}
 
 	platform_set_drvdata(pdev, vb_gpio);
 
 	return ret;
-
-err_gpiob:
-	gpiochip_remove(&vb_gpio->gpioa);
-
-err_gpioa:
-	return ret;
-}
-
-static int vprbrd_gpio_remove(struct platform_device *pdev)
-{
-	struct vprbrd_gpio *vb_gpio = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&vb_gpio->gpiob);
-
-	return 0;
 }
 
 static struct platform_driver vprbrd_gpio_driver = {
 	.driver.name	= "viperboard-gpio",
 	.driver.owner	= THIS_MODULE,
 	.probe		= vprbrd_gpio_probe,
-	.remove		= vprbrd_gpio_remove,
 };
 
 static int __init vprbrd_gpio_init(void)
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339556 — [PATCH 43/61] gpio: syscon: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 43/61] gpio: syscon: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-115@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-syscon.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-syscon.c b/drivers/gpio/gpio-syscon.c
index e5c5b62..24b6d64 100644
--- a/drivers/gpio/gpio-syscon.c
+++ b/drivers/gpio/gpio-syscon.c
@@ -238,15 +238,7 @@ static int syscon_gpio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, priv);
 
-	return gpiochip_add_data(&priv->chip, priv);
-}
-
-static int syscon_gpio_remove(struct platform_device *pdev)
-{
-	struct syscon_gpio_priv *priv = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&priv->chip);
-	return 0;
+	return devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
 }
 
 static struct platform_driver syscon_gpio_driver = {
@@ -255,7 +247,6 @@ static struct platform_driver syscon_gpio_driver = {
 		.of_match_table	= syscon_gpio_ids,
 	},
 	.probe	= syscon_gpio_probe,
-	.remove	= syscon_gpio_remove,
 };
 module_platform_driver(syscon_gpio_driver);
 
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339557 — [PATCH 15/61] gpio: da9052: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 15/61] gpio: da9052: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-117@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-da9052.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-da9052.c b/drivers/gpio/gpio-da9052.c
index f9b3247..e29553b 100644
--- a/drivers/gpio/gpio-da9052.c
+++ b/drivers/gpio/gpio-da9052.c
@@ -214,7 +214,7 @@ static int da9052_gpio_probe(struct platform_device *pdev)
 	if (pdata && pdata->gpio_base)
 		gpio->gp.base = pdata->gpio_base;
 
-	ret = gpiochip_add_data(&gpio->gp, gpio);
+	ret = devm_gpiochip_add_data(&pdev->dev, &gpio->gp, gpio);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret);
 		return ret;
@@ -225,17 +225,8 @@ static int da9052_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int da9052_gpio_remove(struct platform_device *pdev)
-{
-	struct da9052_gpio *gpio = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&gpio->gp);
-	return 0;
-}
-
 static struct platform_driver da9052_gpio_driver = {
 	.probe = da9052_gpio_probe,
-	.remove = da9052_gpio_remove,
 	.driver = {
 		.name	= "da9052-gpio",
 	},
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339558 — [PATCH 02/61] gpio: Add resource management devm_gpio_chip_{add_data,remove}

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 02/61] gpio: Add resource management devm_gpio_chip_{add_data,remove}
Message-ID<r4ZEW-741-119@gated-at.bofh.it>
In reply to#1339526
Add devm wrappers for the gpiochip_add_data() and gpiochip_remove().

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 Documentation/driver-model/devres.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 831a536..8d8f944 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -252,6 +252,8 @@ GPIO
   devm_gpiod_get_index_optional()
   devm_gpiod_get_optional()
   devm_gpiod_put()
+  devm_gpiochip_add_data()
+  devm_gpiochip_remove()
 
 IIO
   devm_iio_device_alloc()
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339559 — [PATCH 34/61] gpio: pcf857x: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 34/61] gpio: pcf857x: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-123@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and clean the
error path.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpio-pcf857x.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index 709cd3f..169c09a 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -372,7 +372,7 @@ static int pcf857x_probe(struct i2c_client *client,
 	gpio->out = ~n_latch;
 	gpio->status = gpio->out;
 
-	status = gpiochip_add_data(&gpio->chip, gpio);
+	status = devm_gpiochip_add_data(&client->dev, &gpio->chip, gpio);
 	if (status < 0)
 		goto fail;
 
@@ -383,7 +383,7 @@ static int pcf857x_probe(struct i2c_client *client,
 					      IRQ_TYPE_NONE);
 		if (status) {
 			dev_err(&client->dev, "cannot add irqchip\n");
-			goto fail_irq;
+			goto fail;
 		}
 
 		status = devm_request_threaded_irq(&client->dev, client->irq,
@@ -391,7 +391,7 @@ static int pcf857x_probe(struct i2c_client *client,
 					IRQF_TRIGGER_FALLING | IRQF_SHARED,
 					dev_name(&client->dev), gpio);
 		if (status)
-			goto fail_irq;
+			goto fail;
 
 		gpiochip_set_chained_irqchip(&gpio->chip, &pcf857x_irq_chip,
 					     client->irq, NULL);
@@ -413,9 +413,6 @@ static int pcf857x_probe(struct i2c_client *client,
 
 	return 0;
 
-fail_irq:
-	gpiochip_remove(&gpio->chip);
-
 fail:
 	dev_dbg(&client->dev, "probe error %d for '%s'\n", status,
 		client->name);
@@ -440,7 +437,6 @@ static int pcf857x_remove(struct i2c_client *client)
 		}
 	}
 
-	gpiochip_remove(&gpio->chip);
 	return status;
 }
 
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339560 — [PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-121@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: patches@opensource.wolfsonmicro.com
---
 drivers/gpio/gpio-wm8994.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/gpio/gpio-wm8994.c b/drivers/gpio/gpio-wm8994.c
index 3ae4c15..b089df9 100644
--- a/drivers/gpio/gpio-wm8994.c
+++ b/drivers/gpio/gpio-wm8994.c
@@ -261,34 +261,23 @@ static int wm8994_gpio_probe(struct platform_device *pdev)
 	else
 		wm8994_gpio->gpio_chip.base = -1;
 
-	ret = gpiochip_add_data(&wm8994_gpio->gpio_chip, wm8994_gpio);
+	ret = devm_gpiochip_add_data(&pdev->dev, &wm8994_gpio->gpio_chip,
+				     wm8994_gpio);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n",
 			ret);
-		goto err;
+		return ret;
 	}
 
 	platform_set_drvdata(pdev, wm8994_gpio);
 
 	return ret;
-
-err:
-	return ret;
-}
-
-static int wm8994_gpio_remove(struct platform_device *pdev)
-{
-	struct wm8994_gpio *wm8994_gpio = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&wm8994_gpio->gpio_chip);
-	return 0;
 }
 
 static struct platform_driver wm8994_gpio_driver = {
 	.driver.name	= "wm8994-gpio",
 	.driver.owner	= THIS_MODULE,
 	.probe		= wm8994_gpio_probe,
-	.remove		= wm8994_gpio_remove,
 };
 
 static int __init wm8994_gpio_init(void)
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1339709 — Re: [PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration

FromCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date2016-02-22 17:40 +0100
SubjectRe: [PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r51GH-8uQ-31@gated-at.bofh.it>
In reply to#1339560
On Mon, Feb 22, 2016 at 07:38:48PM +0530, Laxman Dewangan wrote:
> Use devm_gpiochip_add_data() for GPIO registration and remove the
> need of driver callback .remove.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: patches@opensource.wolfsonmicro.com
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

[toc] | [prev] | [next] | [standalone]


#1339561 — [PATCH 16/61] gpio: da9055: Use devm_gpiochip_add_data() for gpio registration

FromLaxman Dewangan <ldewangan@nvidia.com>
Date2016-02-22 15:30 +0100
Subject[PATCH 16/61] gpio: da9055: Use devm_gpiochip_add_data() for gpio registration
Message-ID<r4ZEW-741-125@gated-at.bofh.it>
In reply to#1339526
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Support Opensource <support.opensource@diasemi.com>
---
 drivers/gpio/gpio-da9055.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/gpio/gpio-da9055.c b/drivers/gpio/gpio-da9055.c
index 18210fb..2c2c18d 100644
--- a/drivers/gpio/gpio-da9055.c
+++ b/drivers/gpio/gpio-da9055.c
@@ -151,31 +151,19 @@ static int da9055_gpio_probe(struct platform_device *pdev)
 	if (pdata && pdata->gpio_base)
 		gpio->gp.base = pdata->gpio_base;
 
-	ret = gpiochip_add_data(&gpio->gp, gpio);
+	ret = devm_gpiochip_add_data(&pdev->dev, &gpio->gp, gpio);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret);
-		goto err_mem;
+		return ret;
 	}
 
 	platform_set_drvdata(pdev, gpio);
 
 	return 0;
-
-err_mem:
-	return ret;
-}
-
-static int da9055_gpio_remove(struct platform_device *pdev)
-{
-	struct da9055_gpio *gpio = platform_get_drvdata(pdev);
-
-	gpiochip_remove(&gpio->gp);
-	return 0;
 }
 
 static struct platform_driver da9055_gpio_driver = {
 	.probe = da9055_gpio_probe,
-	.remove = da9055_gpio_remove,
 	.driver = {
 		.name	= "da9055-gpio",
 	},
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | linux.kernel


csiph-web