linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata()
@ 2023-08-11 19:40 Andrei Coardos
  2023-08-13 15:32 ` Jernej Škrabec
  2023-08-16 10:32 ` Daniel Lezcano
  0 siblings, 2 replies; 4+ messages in thread
From: Andrei Coardos @ 2023-08-11 19:40 UTC (permalink / raw)
  To: linux-kernel, linux-sunxi, linux-arm-kernel, linux-pm
  Cc: samuel, jernej.skrabec, wens, rui.zhang, amitk, daniel.lezcano,
	rafael, tiny.windzz, anarsoul, alex, 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/sun8i_thermal.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 195f3c5d0b38..61a2f287ac90 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -489,8 +489,6 @@ static int sun8i_ths_probe(struct platform_device *pdev)
 	if (!tmdev->chip)
 		return -EINVAL;
 
-	platform_set_drvdata(pdev, tmdev);
-
 	ret = sun8i_ths_resource_init(tmdev);
 	if (ret)
 		return ret;
-- 
2.34.1


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

end of thread, other threads:[~2023-08-16 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 19:40 [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-13 15:32 ` Jernej Škrabec
2023-08-13 18:58   ` Alexandru Ardelean
2023-08-16 10:32 ` Daniel Lezcano

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).