summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_hwmon.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2023-03-01 23:14:37 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-03-03 22:45:02 +0300
commitdec07d399cc82e37681251775cdd924db455fdae (patch)
tree2bb7b132d069bfecdaef3b31d668835ee1a241ae /drivers/thermal/thermal_hwmon.c
parent4a16c190f761cb3a87dcbbf355f91c71ce1f8c0b (diff)
downloadlinux-dec07d399cc82e37681251775cdd924db455fdae.tar.xz
thermal: Don't use 'device' internal thermal zone structure field
Some drivers are directly using the thermal zone's 'device' structure field. Use the driver device pointer instead of the thermal zone device when it is available. Remove the traces when they are duplicate with the traces in the core code. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek LVTS Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek LVTS Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/thermal_hwmon.c')
-rw-r--r--drivers/thermal/thermal_hwmon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index 964db7941e31..bc02095b314c 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -228,14 +228,14 @@ void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
hwmon = thermal_hwmon_lookup_by_type(tz);
if (unlikely(!hwmon)) {
/* Should never happen... */
- dev_dbg(&tz->device, "hwmon device lookup failed!\n");
+ dev_dbg(hwmon->device, "hwmon device lookup failed!\n");
return;
}
temp = thermal_hwmon_lookup_temp(hwmon, tz);
if (unlikely(!temp)) {
/* Should never happen... */
- dev_dbg(&tz->device, "temperature input lookup failed!\n");
+ dev_dbg(hwmon->device, "temperature input lookup failed!\n");
return;
}