@@ -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
@@ -201,7 +201,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
201201static int mlxsw_thermal_bind (struct thermal_zone_device * tzdev ,
202202 struct thermal_cooling_device * cdev )
203203{
204- struct mlxsw_thermal * thermal = tzdev -> devdata ;
204+ struct mlxsw_thermal * thermal = thermal_zone_device_priv ( tzdev ) ;
205205 struct device * dev = thermal -> bus_info -> dev ;
206206 int i , err ;
207207
@@ -227,7 +227,7 @@ static int mlxsw_thermal_bind(struct thermal_zone_device *tzdev,
227227static int mlxsw_thermal_unbind (struct thermal_zone_device * tzdev ,
228228 struct thermal_cooling_device * cdev )
229229{
230- struct mlxsw_thermal * thermal = tzdev -> devdata ;
230+ struct mlxsw_thermal * thermal = thermal_zone_device_priv ( tzdev ) ;
231231 struct device * dev = thermal -> bus_info -> dev ;
232232 int i ;
233233 int err ;
@@ -249,7 +249,7 @@ static int mlxsw_thermal_unbind(struct thermal_zone_device *tzdev,
249249static int mlxsw_thermal_get_temp (struct thermal_zone_device * tzdev ,
250250 int * p_temp )
251251{
252- struct mlxsw_thermal * thermal = tzdev -> devdata ;
252+ struct mlxsw_thermal * thermal = thermal_zone_device_priv ( tzdev ) ;
253253 struct device * dev = thermal -> bus_info -> dev ;
254254 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
255255 int temp ;
@@ -281,7 +281,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_ops = {
281281static int mlxsw_thermal_module_bind (struct thermal_zone_device * tzdev ,
282282 struct thermal_cooling_device * cdev )
283283{
284- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
284+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
285285 struct mlxsw_thermal * thermal = tz -> parent ;
286286 int i , j , err ;
287287
@@ -310,7 +310,7 @@ static int mlxsw_thermal_module_bind(struct thermal_zone_device *tzdev,
310310static int mlxsw_thermal_module_unbind (struct thermal_zone_device * tzdev ,
311311 struct thermal_cooling_device * cdev )
312312{
313- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
313+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
314314 struct mlxsw_thermal * thermal = tz -> parent ;
315315 int i ;
316316 int err ;
@@ -356,7 +356,7 @@ mlxsw_thermal_module_temp_and_thresholds_get(struct mlxsw_core *core,
356356static int mlxsw_thermal_module_temp_get (struct thermal_zone_device * tzdev ,
357357 int * p_temp )
358358{
359- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
359+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
360360 struct mlxsw_thermal * thermal = tz -> parent ;
361361 int temp , crit_temp , emerg_temp ;
362362 struct device * dev ;
@@ -391,7 +391,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_module_ops = {
391391static int mlxsw_thermal_gearbox_temp_get (struct thermal_zone_device * tzdev ,
392392 int * p_temp )
393393{
394- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
394+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
395395 struct mlxsw_thermal * thermal = tz -> parent ;
396396 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
397397 u16 index ;
0 commit comments