* [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
@ 2013-08-21 9:45 Jingoo Han
2013-08-22 0:31 ` Simon Horman
2013-08-26 12:38 ` Guennadi Liakhovetski
0 siblings, 2 replies; 6+ messages in thread
From: Jingoo Han @ 2013-08-21 9:45 UTC (permalink / raw)
To: 'Vinod Koul'
Cc: 'Dan Williams', linux-kernel, 'Simon Horman',
'Guennadi Liakhovetski', 'Jingoo Han'
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/dma/sh/shdma.c | 3 ---
drivers/dma/sh/sudmac.c | 2 --
2 files changed, 5 deletions(-)
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 211e2f1..208de0f 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -873,7 +873,6 @@ rst_err:
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&shdev->shdma_dev);
eshdma:
if (dmars)
@@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
iounmap(shdev->dmars);
iounmap(shdev->chan_reg);
- platform_set_drvdata(pdev, NULL);
-
synchronize_rcu();
kfree(shdev);
diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
index c494417..23fffc8 100644
--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev)
chan_probe_err:
sudmac_chan_remove(su_dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&su_dev->shdma_dev);
return err;
@@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev)
dma_async_device_unregister(dma_dev);
sudmac_chan_remove(su_dev);
shdma_cleanup(&su_dev->shdma_dev);
- platform_set_drvdata(pdev, NULL);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
2013-08-21 9:45 [PATCH] dma: sh: remove unnecessary platform_set_drvdata() Jingoo Han
@ 2013-08-22 0:31 ` Simon Horman
2013-08-26 12:38 ` Guennadi Liakhovetski
1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2013-08-22 0:31 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Vinod Koul', 'Dan Williams',
linux-kernel, 'Guennadi Liakhovetski'
On Wed, Aug 21, 2013 at 06:45:35PM +0900, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Vinod, could you take this?
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/dma/sh/shdma.c | 3 ---
> drivers/dma/sh/sudmac.c | 2 --
> 2 files changed, 5 deletions(-)
>
> diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
> index 211e2f1..208de0f 100644
> --- a/drivers/dma/sh/shdma.c
> +++ b/drivers/dma/sh/shdma.c
> @@ -873,7 +873,6 @@ rst_err:
> pm_runtime_put(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
>
> - platform_set_drvdata(pdev, NULL);
> shdma_cleanup(&shdev->shdma_dev);
> eshdma:
> if (dmars)
> @@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
> iounmap(shdev->dmars);
> iounmap(shdev->chan_reg);
>
> - platform_set_drvdata(pdev, NULL);
> -
> synchronize_rcu();
> kfree(shdev);
>
> diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
> index c494417..23fffc8 100644
> --- a/drivers/dma/sh/sudmac.c
> +++ b/drivers/dma/sh/sudmac.c
> @@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev)
> chan_probe_err:
> sudmac_chan_remove(su_dev);
>
> - platform_set_drvdata(pdev, NULL);
> shdma_cleanup(&su_dev->shdma_dev);
>
> return err;
> @@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev)
> dma_async_device_unregister(dma_dev);
> sudmac_chan_remove(su_dev);
> shdma_cleanup(&su_dev->shdma_dev);
> - platform_set_drvdata(pdev, NULL);
>
> return 0;
> }
> --
> 1.7.10.4
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
2013-08-21 9:45 [PATCH] dma: sh: remove unnecessary platform_set_drvdata() Jingoo Han
2013-08-22 0:31 ` Simon Horman
@ 2013-08-26 12:38 ` Guennadi Liakhovetski
2013-08-26 13:50 ` Vinod Koul
1 sibling, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2013-08-26 12:38 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Vinod Koul', 'Dan Williams',
linux-kernel, 'Simon Horman'
On Wed, 21 Aug 2013, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
This has to be updated on top of current
http://git.infradead.org/users/vkoul/slave-dma.git next branch, there it
will patch the drivers/dma/sh/shdmac.c file, not drivers/dma/sh/shdma.c.
After that feel free to add my
Acked-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Thanks
Guennadi
> ---
> drivers/dma/sh/shdma.c | 3 ---
> drivers/dma/sh/sudmac.c | 2 --
> 2 files changed, 5 deletions(-)
>
> diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
> index 211e2f1..208de0f 100644
> --- a/drivers/dma/sh/shdma.c
> +++ b/drivers/dma/sh/shdma.c
> @@ -873,7 +873,6 @@ rst_err:
> pm_runtime_put(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
>
> - platform_set_drvdata(pdev, NULL);
> shdma_cleanup(&shdev->shdma_dev);
> eshdma:
> if (dmars)
> @@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
> iounmap(shdev->dmars);
> iounmap(shdev->chan_reg);
>
> - platform_set_drvdata(pdev, NULL);
> -
> synchronize_rcu();
> kfree(shdev);
>
> diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
> index c494417..23fffc8 100644
> --- a/drivers/dma/sh/sudmac.c
> +++ b/drivers/dma/sh/sudmac.c
> @@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev)
> chan_probe_err:
> sudmac_chan_remove(su_dev);
>
> - platform_set_drvdata(pdev, NULL);
> shdma_cleanup(&su_dev->shdma_dev);
>
> return err;
> @@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev)
> dma_async_device_unregister(dma_dev);
> sudmac_chan_remove(su_dev);
> shdma_cleanup(&su_dev->shdma_dev);
> - platform_set_drvdata(pdev, NULL);
>
> return 0;
> }
> --
> 1.7.10.4
>
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
2013-08-26 12:38 ` Guennadi Liakhovetski
@ 2013-08-26 13:50 ` Vinod Koul
0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2013-08-26 13:50 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Jingoo Han, 'Dan Williams', linux-kernel, 'Simon Horman'
On Mon, Aug 26, 2013 at 02:38:17PM +0200, Guennadi Liakhovetski wrote:
> On Wed, 21 Aug 2013, Jingoo Han wrote:
>
> > The driver core clears the driver data to NULL after device_release
> > or on probe failure. Thus, it is not needed to manually clear the
> > device driver data to NULL.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>
> This has to be updated on top of current
> http://git.infradead.org/users/vkoul/slave-dma.git next branch, there it
> will patch the drivers/dma/sh/shdmac.c file, not drivers/dma/sh/shdma.c.
> After that feel free to add my
He already updated & i have applied...
>
> Acked-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
added...
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
2013-08-21 9:51 Jingoo Han
@ 2013-08-25 8:36 ` Vinod Koul
0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2013-08-25 8:36 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Dan Williams', linux-kernel, 'Andy Shevchenko',
'Fabio Estevam', 'Shawn Guo'
On Wed, Aug 21, 2013 at 06:51:56PM +0900, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
Can you pls rebase this as resend. I have applied bunch of sh-dma patches and
this doenst apply for me
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
@ 2013-08-21 9:51 Jingoo Han
2013-08-25 8:36 ` Vinod Koul
0 siblings, 1 reply; 6+ messages in thread
From: Jingoo Han @ 2013-08-21 9:51 UTC (permalink / raw)
To: 'Vinod Koul'
Cc: 'Dan Williams', linux-kernel, 'Andy Shevchenko',
'Jingoo Han', 'Fabio Estevam',
'Shawn Guo', 'Jingoo Han'
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/dma/sh/shdma.c | 3 ---
drivers/dma/sh/sudmac.c | 2 --
2 files changed, 5 deletions(-)
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 211e2f1..208de0f 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -873,7 +873,6 @@ rst_err:
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&shdev->shdma_dev);
eshdma:
if (dmars)
@@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
iounmap(shdev->dmars);
iounmap(shdev->chan_reg);
- platform_set_drvdata(pdev, NULL);
-
synchronize_rcu();
kfree(shdev);
diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
index c494417..23fffc8 100644
--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev)
chan_probe_err:
sudmac_chan_remove(su_dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&su_dev->shdma_dev);
return err;
@@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev)
dma_async_device_unregister(dma_dev);
sudmac_chan_remove(su_dev);
shdma_cleanup(&su_dev->shdma_dev);
- platform_set_drvdata(pdev, NULL);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-26 14:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 9:45 [PATCH] dma: sh: remove unnecessary platform_set_drvdata() Jingoo Han
2013-08-22 0:31 ` Simon Horman
2013-08-26 12:38 ` Guennadi Liakhovetski
2013-08-26 13:50 ` Vinod Koul
2013-08-21 9:51 Jingoo Han
2013-08-25 8:36 ` Vinod Koul
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).