9dedc2cb685279e2bc1a5e3f54a0e7d414fdb157
[openwrt/staging/ldir.git] /
1 From 5a72b8e4bac753e4dc74dc0a1335d120f63df97a Mon Sep 17 00:00:00 2001
2 From: Daniel Lezcano <daniel.lezcano@linaro.org>
3 Date: Wed, 1 Mar 2023 21:14:37 +0100
4 Subject: [PATCH 09/42] thermal: Don't use 'device' internal thermal zone
5 structure field
6
7 Some drivers are directly using the thermal zone's 'device' structure
8 field.
9
10 Use the driver device pointer instead of the thermal zone device when
11 it is available.
12
13 Remove the traces when they are duplicate with the traces in the core
14 code.
15
16 [again skipped imx_thermal.c]
17
18 Cc: Jean Delvare <jdelvare@suse.com>
19 Cc: Guenter Roeck <linux@roeck-us.net>
20 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
21 Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek LVTS
22 Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek LVTS
23 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
24 ---
25 drivers/thermal/mediatek/lvts_thermal.c | 4 ++--
26 drivers/thermal/thermal_hwmon.c | 4 ++--
27 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 +-
28 3 files changed, 5 insertions(+), 5 deletions(-)
29
30 --- a/drivers/thermal/mediatek/lvts_thermal.c
31 +++ b/drivers/thermal/mediatek/lvts_thermal.c
32 @@ -305,7 +305,7 @@ static int lvts_set_trips(struct thermal
33 * 14-0 : Raw temperature for threshold
34 */
35 if (low != -INT_MAX) {
36 - dev_dbg(&tz->device, "Setting low limit temperature interrupt: %d\n", low);
37 + pr_debug("%s: Setting low limit temperature interrupt: %d\n", tz->type, low);
38 writel(raw_low, LVTS_H2NTHRE(base));
39 }
40
41 @@ -318,7 +318,7 @@ static int lvts_set_trips(struct thermal
42 *
43 * 14-0 : Raw temperature for threshold
44 */
45 - dev_dbg(&tz->device, "Setting high limit temperature interrupt: %d\n", high);
46 + pr_debug("%s: Setting high limit temperature interrupt: %d\n", tz->type, high);
47 writel(raw_high, LVTS_HTHRE(base));
48
49 return 0;
50 --- a/drivers/thermal/thermal_hwmon.c
51 +++ b/drivers/thermal/thermal_hwmon.c
52 @@ -220,14 +220,14 @@ void thermal_remove_hwmon_sysfs(struct t
53 hwmon = thermal_hwmon_lookup_by_type(tz);
54 if (unlikely(!hwmon)) {
55 /* Should never happen... */
56 - dev_dbg(&tz->device, "hwmon device lookup failed!\n");
57 + dev_dbg(hwmon->device, "hwmon device lookup failed!\n");
58 return;
59 }
60
61 temp = thermal_hwmon_lookup_temp(hwmon, tz);
62 if (unlikely(!temp)) {
63 /* Should never happen... */
64 - dev_dbg(&tz->device, "temperature input lookup failed!\n");
65 + dev_dbg(hwmon->device, "temperature input lookup failed!\n");
66 return;
67 }
68
69 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
70 +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
71 @@ -43,7 +43,7 @@ static void ti_thermal_work(struct work_
72
73 thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED);
74
75 - dev_dbg(&data->ti_thermal->device, "updated thermal zone %s\n",
76 + dev_dbg(data->bgp->dev, "updated thermal zone %s\n",
77 data->ti_thermal->type);
78 }
79