All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio-lynxpoint: remove unnecessary platform_set_drvdata()
@ 2013-05-22 10:30 Andy Shevchenko
  2013-05-23  7:44 ` Mika Westerberg
  2013-05-30 18:30 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2013-05-22 10:30 UTC (permalink / raw)
  To: Linus Walleij, linux-kernel, Mika Westerberg; +Cc: Andy Shevchenko

Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound",
this is done by driver core after device_release or on probe failure. Thus we
can remove all platform_set_drvdata(pdev, NULL) in drivers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-lynxpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c
index 86c17de..588991d 100644
--- a/drivers/gpio/gpio-lynxpoint.c
+++ b/drivers/gpio/gpio-lynxpoint.c
@@ -444,10 +444,10 @@ static int lp_gpio_remove(struct platform_device *pdev)
 {
 	struct lp_gpio *lg = platform_get_drvdata(pdev);
 	int err;
+
 	err = gpiochip_remove(&lg->chip);
 	if (err)
 		dev_warn(&pdev->dev, "failed to remove gpio_chip.\n");
-	platform_set_drvdata(pdev, NULL);
 	return 0;
 }
 
-- 
1.8.2.rc0.22.gb3600c3


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

* Re: [PATCH] gpio-lynxpoint: remove unnecessary platform_set_drvdata()
  2013-05-22 10:30 [PATCH] gpio-lynxpoint: remove unnecessary platform_set_drvdata() Andy Shevchenko
@ 2013-05-23  7:44 ` Mika Westerberg
  2013-05-30 18:30 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2013-05-23  7:44 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Linus Walleij, linux-kernel

On Wed, May 22, 2013 at 01:30:46PM +0300, Andy Shevchenko wrote:
> Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound",
> this is done by driver core after device_release or on probe failure. Thus we
> can remove all platform_set_drvdata(pdev, NULL) in drivers.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

* Re: [PATCH] gpio-lynxpoint: remove unnecessary platform_set_drvdata()
  2013-05-22 10:30 [PATCH] gpio-lynxpoint: remove unnecessary platform_set_drvdata() Andy Shevchenko
  2013-05-23  7:44 ` Mika Westerberg
@ 2013-05-30 18:30 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-05-30 18:30 UTC (permalink / raw)
  To: Andy Shevchenko, Jingoo Han; +Cc: linux-kernel, Mika Westerberg

On Wed, May 22, 2013 at 12:30 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound",
> this is done by driver core after device_release or on probe failure. Thus we
> can remove all platform_set_drvdata(pdev, NULL) in drivers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I already had a patch from Jingoo Han for this in my patch queue,
so dropped this patch.

Yours,
Linus Walleij

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

end of thread, other threads:[~2013-05-30 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 10:30 [PATCH] gpio-lynxpoint: remove unnecessary platform_set_drvdata() Andy Shevchenko
2013-05-23  7:44 ` Mika Westerberg
2013-05-30 18:30 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.