diff mbox

[1/6] thermal: armada: remove unnecessary platform_set_drvdata()

Message ID 003e01ce4a11$e1134900$a339db00$@samsung.com (mailing list archive)
State Superseded, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Jingoo Han May 6, 2013, 4:26 a.m. UTC
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/thermal/armada_thermal.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Zhang Rui May 6, 2013, 2:32 p.m. UTC | #1
On Mon, 2013-05-06 at 13:26 +0900, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> (device-core: Ensure drvdata = NULL when no driver is bound).
> Thus, it is not needed to manually clear the device driver data to NULL.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

it seems that we already have a patchset for this issue.
please check https://patchwork.kernel.org/patch/2516651/

thanks,
rui
> ---
>  drivers/thermal/armada_thermal.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
> index 5b4d75f..0d02d4e 100644
> --- a/drivers/thermal/armada_thermal.c
> +++ b/drivers/thermal/armada_thermal.c
> @@ -210,7 +210,6 @@ static int armada_thermal_exit(struct platform_device *pdev)
>  		platform_get_drvdata(pdev);
>  
>  	thermal_zone_device_unregister(armada_thermal);
> -	platform_set_drvdata(pdev, NULL);
>  
>  	return 0;
>  }


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jingoo Han May 7, 2013, 12:09 a.m. UTC | #2
On Monday, May 06, 2013 11:33 PM, Zhang Rui wrote:
> On Mon, 2013-05-06 at 13:26 +0900, Jingoo Han wrote:
> > The driver core clears the driver data to NULL after device_release
> > or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> > (device-core: Ensure drvdata = NULL when no driver is bound).
> > Thus, it is not needed to manually clear the device driver data to NULL.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> 
> it seems that we already have a patchset for this issue.
> please check https://patchwork.kernel.org/patch/2516651/

OK, I see.
These patches seem to be already submitted.
Thank you.

Best regards,
Jingoo Han

> 
> thanks,
> rui
> > ---
> >  drivers/thermal/armada_thermal.c |    1 -
> >  1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
> > index 5b4d75f..0d02d4e 100644
> > --- a/drivers/thermal/armada_thermal.c
> > +++ b/drivers/thermal/armada_thermal.c
> > @@ -210,7 +210,6 @@ static int armada_thermal_exit(struct platform_device *pdev)
> >  		platform_get_drvdata(pdev);
> >
> >  	thermal_zone_device_unregister(armada_thermal);
> > -	platform_set_drvdata(pdev, NULL);
> >
> >  	return 0;
> >  }


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 5b4d75f..0d02d4e 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -210,7 +210,6 @@  static int armada_thermal_exit(struct platform_device *pdev)
 		platform_get_drvdata(pdev);
 
 	thermal_zone_device_unregister(armada_thermal);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }