linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata
@ 2016-11-25 13:48 Charles Keepax
  2016-11-25 13:48 ` [PATCH 2/2] gpio: arizona: Tidy up probe error path Charles Keepax
  2016-11-30 12:50 ` [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Charles Keepax @ 2016-11-25 13:48 UTC (permalink / raw)
  To: linus.walleij; +Cc: gnurou, linux-gpio, patches

We use the gpio chip private data in all the callbacks so remove this
redundant line of code.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/gpio/gpio-arizona.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index 4824628..ed41537 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -140,8 +140,6 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	platform_set_drvdata(pdev, arizona_gpio);
-
 	return ret;
 
 err:
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] gpio: arizona: Tidy up probe error path
  2016-11-25 13:48 [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata Charles Keepax
@ 2016-11-25 13:48 ` Charles Keepax
  2016-11-30 12:50   ` Linus Walleij
  2016-11-30 12:50 ` [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Charles Keepax @ 2016-11-25 13:48 UTC (permalink / raw)
  To: linus.walleij; +Cc: gnurou, linux-gpio, patches

There is some unnecessary complexity in the error path which now things
are converted to devm is actually very simple. This patch simplifies
things.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/gpio/gpio-arizona.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index ed41537..1f91557 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -137,13 +137,10 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n",
 			ret);
-		goto err;
+		return ret;
 	}
 
-	return ret;
-
-err:
-	return ret;
+	return 0;
 }
 
 static struct platform_driver arizona_gpio_driver = {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata
  2016-11-25 13:48 [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata Charles Keepax
  2016-11-25 13:48 ` [PATCH 2/2] gpio: arizona: Tidy up probe error path Charles Keepax
@ 2016-11-30 12:50 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-11-30 12:50 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
	open list:WOLFSON MICROELECTRONICS DRIVERS

On Fri, Nov 25, 2016 at 2:48 PM, Charles Keepax
<ckeepax@opensource.wolfsonmicro.com> wrote:

> We use the gpio chip private data in all the callbacks so remove this
> redundant line of code.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] gpio: arizona: Tidy up probe error path
  2016-11-25 13:48 ` [PATCH 2/2] gpio: arizona: Tidy up probe error path Charles Keepax
@ 2016-11-30 12:50   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-11-30 12:50 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
	open list:WOLFSON MICROELECTRONICS DRIVERS

On Fri, Nov 25, 2016 at 2:48 PM, Charles Keepax
<ckeepax@opensource.wolfsonmicro.com> wrote:

> There is some unnecessary complexity in the error path which now things
> are converted to devm is actually very simple. This patch simplifies
> things.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-30 12:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-25 13:48 [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata Charles Keepax
2016-11-25 13:48 ` [PATCH 2/2] gpio: arizona: Tidy up probe error path Charles Keepax
2016-11-30 12:50   ` Linus Walleij
2016-11-30 12:50 ` [PATCH 1/2] gpio: arizona: Remove pointless set of platform drvdata Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).