Skip to content

Commit dbb0ea1

Browse files
dlezcanorafaeljw
authored andcommitted
thermal: Use thermal_zone_device_type() accessor
Replace the accesses to 'tz->type' by its accessor version in order to self-encapsulate the thermal_zone_device structure. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> #mlxsw Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek LVTS Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 3034f85 commit dbb0ea1

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/net/ethernet/mellanox/mlxsw/core_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
177177

178178
if (crit_temp > emerg_temp) {
179179
dev_warn(dev, "%s : Critical threshold %d is above emergency threshold %d\n",
180-
tz->tzdev->type, crit_temp, emerg_temp);
180+
thermal_zone_device_type(tz->tzdev), crit_temp, emerg_temp);
181181
return 0;
182182
}
183183

drivers/thermal/mediatek/lvts_thermal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high)
305305
* 14-0 : Raw temperature for threshold
306306
*/
307307
if (low != -INT_MAX) {
308-
pr_debug("%s: Setting low limit temperature interrupt: %d\n", tz->type, low);
308+
pr_debug("%s: Setting low limit temperature interrupt: %d\n",
309+
thermal_zone_device_type(tz), low);
309310
writel(raw_low, LVTS_H2NTHRE(base));
310311
}
311312

@@ -318,7 +319,8 @@ static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high)
318319
*
319320
* 14-0 : Raw temperature for threshold
320321
*/
321-
pr_debug("%s: Setting high limit temperature interrupt: %d\n", tz->type, high);
322+
pr_debug("%s: Setting high limit temperature interrupt: %d\n",
323+
thermal_zone_device_type(tz), high);
322324
writel(raw_high, LVTS_HTHRE(base));
323325

324326
return 0;

drivers/thermal/ti-soc-thermal/ti-thermal-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void ti_thermal_work(struct work_struct *work)
4444
thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED);
4545

4646
dev_dbg(data->bgp->dev, "updated thermal zone %s\n",
47-
data->ti_thermal->type);
47+
thermal_zone_device_type(data->ti_thermal));
4848
}
4949

5050
/**

0 commit comments

Comments
 (0)