summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches-6.1/830-v6.6-38-thermal-drivers-mediatek-auxadc_thermal-Removed-call.patch
blob: 994461cdb161bc123e7f49f27e333a23454bfd4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From c864ff9de3b225b43bb8e08dedb223632323e059 Mon Sep 17 00:00:00 2001
From: Andrei Coardos <aboutphysycs@gmail.com>
Date: Fri, 11 Aug 2023 22:28:47 +0300
Subject: [PATCH 34/42] thermal/drivers/mediatek/auxadc_thermal: Removed call
 to platform_set_drvdata()

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>
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230811192847.3838-1-aboutphysycs@gmail.com
---
 drivers/thermal/mediatek/auxadc_thermal.c | 2 --
 1 file changed, 2 deletions(-)

--- a/drivers/thermal/mediatek/auxadc_thermal.c
+++ b/drivers/thermal/mediatek/auxadc_thermal.c
@@ -1283,8 +1283,6 @@ static int mtk_thermal_probe(struct plat
 			mtk_thermal_init_bank(mt, i, apmixed_phys_base,
 					      auxadc_phys_base, ctrl_id);
 
-	platform_set_drvdata(pdev, mt);
-
 	tzdev = devm_thermal_of_zone_register(&pdev->dev, 0, mt,
 					      &mtk_thermal_ops);
 	if (IS_ERR(tzdev))