2013-10-03 13:07:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 7/9] spi: pl022: Remove unnecessary amba_set_drvdata()

On Thu, Oct 03, 2013 at 11:46:29AM +0200, Michal Simek wrote:
> Driver core clears the driver data to NULL after device_release
> or on probe failure, so just remove it from here.

A patch for this from Jingoo Han already been applied.


Attachments:
(No filename) (236.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-10-03 16:47:10

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 8/9] watchdog: sp805_wdt: Remove unnecessary amba_set_drvdata()

On Thu, Oct 03, 2013 at 11:46:30AM +0200, Michal Simek wrote:
> Driver core clears the driver data to NULL after device_release
> or on probe failure, so just remove it from here.
>
> Driver core change:
> "device-core: Ensure drvdata = NULL when no driver is bound"
> (sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)
>
> Signed-off-by: Michal Simek <[email protected]>
> ---
> drivers/watchdog/sp805_wdt.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index 58df98a..3f786ce 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
> @@ -268,7 +268,6 @@ static int sp805_wdt_remove(struct amba_device *adev)
> struct sp805_wdt *wdt = amba_get_drvdata(adev);
>
> watchdog_unregister_device(&wdt->wdd);
> - amba_set_drvdata(adev, NULL);
> watchdog_set_drvdata(&wdt->wdd, NULL);

This one is quite unnecessary as well. The wdt data structure will be freed
as part of the removal. That could be a separate patch, though, so still

Reviewed-by: Guenter Roeck <[email protected]>

If you like, feel free to resubmit with the watchdog_set_drvdata() removed
and keep my Reviewed-by.

Thanks,
Guenter

>
> return 0;
> --
> 1.8.2.3
>

2013-10-09 08:44:49

by Tomi Valkeinen

[permalink] [raw]
Subject: Re: [PATCH 9/9] video: amba-clcd: Remove unnecessary amba_set_drvdata()

On 03/10/13 12:46, Michal Simek wrote:
> Driver core clears the driver data to NULL after device_release
> or on probe failure, so just remove it from here.
>
> Driver core change:
> "device-core: Ensure drvdata = NULL when no driver is bound"
> (sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)
>
> Signed-off-by: Michal Simek <[email protected]>
> ---
> drivers/video/amba-clcd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
> index 0a2cce7..0bab6ab 100644
> --- a/drivers/video/amba-clcd.c
> +++ b/drivers/video/amba-clcd.c
> @@ -594,8 +594,6 @@ static int clcdfb_remove(struct amba_device *dev)
> {
> struct clcd_fb *fb = amba_get_drvdata(dev);
>
> - amba_set_drvdata(dev, NULL);
> -
> clcdfb_disable(fb);
> unregister_framebuffer(&fb->fb);
> if (fb->fb.cmap.len)
> --
> 1.8.2.3
>

Thanks, queued for 3.13.

Tomi




Attachments:
signature.asc (901.00 B)
OpenPGP digital signature

2013-10-29 07:49:08

by Wim Van Sebroeck

[permalink] [raw]
Subject: Re: [PATCH 8/9] watchdog: sp805_wdt: Remove unnecessary amba_set_drvdata()

Hi Michal,

> Driver core clears the driver data to NULL after device_release
> or on probe failure, so just remove it from here.
>
> Driver core change:
> "device-core: Ensure drvdata = NULL when no driver is bound"
> (sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)
>
> Signed-off-by: Michal Simek <[email protected]>

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.

2013-10-31 15:19:48

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 1/9] dma: pl330: Remove unnecessary amba_set_drvdata()

On Thu, Oct 03, 2013 at 11:46:23AM +0200, Michal Simek wrote:
> Driver core clears the driver data to NULL after device_release
> or on probe failure, so just remove it from here.
>
> Driver core change:
> "device-core: Ensure drvdata = NULL when no driver is bound"
> (sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)
Applied thanks

--
~Vinod

>
> Signed-off-by: Michal Simek <[email protected]>
> ---
> drivers/dma/pl330.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index a562d24..dfb2931 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -3029,8 +3029,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>
> return 0;
> probe_err3:
> - amba_set_drvdata(adev, NULL);
> -
> /* Idle the DMAC */
> list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels,
> chan.device_node) {
> @@ -3064,7 +3062,6 @@ static int pl330_remove(struct amba_device *adev)
> of_dma_controller_free(adev->dev.of_node);
>
> dma_async_device_unregister(&pdmac->ddma);
> - amba_set_drvdata(adev, NULL);
>
> /* Idle the DMAC */
> list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels,
> --
> 1.8.2.3
>



--


Attachments:
(No filename) (1.18 kB)
signature.asc (836.00 B)
Digital signature
Download all attachments