lkml.org 
[lkml]   [2013]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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 <michal.simek@xilinx.com>
> ---
> 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 <linux@roeck-us.net>

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
>




\
 
 \ /
  Last update: 2013-10-03 19:01    [W:0.132 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site