Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] thermal: generic-adc: removed unneeded call to platform_set_drvdata()
@ 2023-08-14 18:09 Andrei Coardos
  2023-08-15 11:51 ` Alexandru Ardelean
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Coardos @ 2023-08-14 18:09 UTC (permalink / raw)
  To: linux-kernel, linux-pm
  Cc: alex, rui.zhang, amitk, daniel.lezcano, rafael, Andrei Coardos

This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.

Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
 drivers/thermal/thermal-generic-adc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c
index f4f1a04f8c0f..1717e4a19dcb 100644
--- a/drivers/thermal/thermal-generic-adc.c
+++ b/drivers/thermal/thermal-generic-adc.c
@@ -142,7 +142,6 @@ static int gadc_thermal_probe(struct platform_device *pdev)
 		return ret;
 
 	gti->dev = &pdev->dev;
-	platform_set_drvdata(pdev, gti);
 
 	gti->tz_dev = devm_thermal_of_zone_register(&pdev->dev, 0, gti,
 						    &gadc_thermal_ops);
-- 
2.34.1


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

* Re: [PATCH] thermal: generic-adc: removed unneeded call to platform_set_drvdata()
  2023-08-14 18:09 [PATCH] thermal: generic-adc: removed unneeded call to platform_set_drvdata() Andrei Coardos
@ 2023-08-15 11:51 ` Alexandru Ardelean
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandru Ardelean @ 2023-08-15 11:51 UTC (permalink / raw)
  To: Andrei Coardos
  Cc: linux-kernel, linux-pm, rui.zhang, amitk, daniel.lezcano, rafael

On Mon, Aug 14, 2023 at 9:09 PM Andrei Coardos <aboutphysycs@gmail.com> wrote:
>
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
>

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>

> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
>  drivers/thermal/thermal-generic-adc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c
> index f4f1a04f8c0f..1717e4a19dcb 100644
> --- a/drivers/thermal/thermal-generic-adc.c
> +++ b/drivers/thermal/thermal-generic-adc.c
> @@ -142,7 +142,6 @@ static int gadc_thermal_probe(struct platform_device *pdev)
>                 return ret;
>
>         gti->dev = &pdev->dev;
> -       platform_set_drvdata(pdev, gti);
>
>         gti->tz_dev = devm_thermal_of_zone_register(&pdev->dev, 0, gti,
>                                                     &gadc_thermal_ops);
> --
> 2.34.1
>

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

end of thread, other threads:[~2023-08-15 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 18:09 [PATCH] thermal: generic-adc: removed unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-15 11:51 ` Alexandru Ardelean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox