Commit dbb0ea15 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Rafael J. Wysocki

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: default avatarDaniel 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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3034f859
...@@ -177,7 +177,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core, ...@@ -177,7 +177,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
if (crit_temp > emerg_temp) { if (crit_temp > emerg_temp) {
dev_warn(dev, "%s : Critical threshold %d is above emergency threshold %d\n", dev_warn(dev, "%s : Critical threshold %d is above emergency threshold %d\n",
tz->tzdev->type, crit_temp, emerg_temp); thermal_zone_device_type(tz->tzdev), crit_temp, emerg_temp);
return 0; return 0;
} }
......
...@@ -305,7 +305,8 @@ static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high) ...@@ -305,7 +305,8 @@ static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high)
* 14-0 : Raw temperature for threshold * 14-0 : Raw temperature for threshold
*/ */
if (low != -INT_MAX) { if (low != -INT_MAX) {
pr_debug("%s: Setting low limit temperature interrupt: %d\n", tz->type, low); pr_debug("%s: Setting low limit temperature interrupt: %d\n",
thermal_zone_device_type(tz), low);
writel(raw_low, LVTS_H2NTHRE(base)); writel(raw_low, LVTS_H2NTHRE(base));
} }
...@@ -318,7 +319,8 @@ static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high) ...@@ -318,7 +319,8 @@ static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high)
* *
* 14-0 : Raw temperature for threshold * 14-0 : Raw temperature for threshold
*/ */
pr_debug("%s: Setting high limit temperature interrupt: %d\n", tz->type, high); pr_debug("%s: Setting high limit temperature interrupt: %d\n",
thermal_zone_device_type(tz), high);
writel(raw_high, LVTS_HTHRE(base)); writel(raw_high, LVTS_HTHRE(base));
return 0; return 0;
......
...@@ -44,7 +44,7 @@ static void ti_thermal_work(struct work_struct *work) ...@@ -44,7 +44,7 @@ static void ti_thermal_work(struct work_struct *work)
thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED); thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED);
dev_dbg(data->bgp->dev, "updated thermal zone %s\n", dev_dbg(data->bgp->dev, "updated thermal zone %s\n",
data->ti_thermal->type); thermal_zone_device_type(data->ti_thermal));
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment