Skip to content

Commit ba7894b

Browse files
dlezcanorafaeljw
authored andcommitted
thermal: intel: pch_thermal: Use thermal driver device to write a trace
The pch_critical() callback accesses the thermal zone device structure internals, it dereferences the thermal zone struct device and the 'type'. Use the available accessors instead of accessing the structure directly. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 7cefbaf commit ba7894b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/thermal/intel/intel_pch_thermal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp)
127127

128128
static void pch_critical(struct thermal_zone_device *tzd)
129129
{
130-
dev_dbg(&tzd->device, "%s: critical temperature reached\n", tzd->type);
130+
dev_dbg(thermal_zone_device(tzd), "%s: critical temperature reached\n",
131+
thermal_zone_device_type(tzd));
131132
}
132133

133134
static struct thermal_zone_device_ops tzd_ops = {

0 commit comments

Comments
 (0)