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
7 Some drivers are directly using the thermal zone's 'device' structure
10 Use the driver device pointer instead of the thermal zone device when
13 Remove the traces when they are duplicate with the traces in the core
16 [again skipped imx_thermal.c]
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>
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(-)
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
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));
41 @@ -318,7 +318,7 @@ static int lvts_set_trips(struct thermal
43 * 14-0 : Raw temperature for threshold
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));
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");
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");
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_
73 thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED);
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);