@@ -176,7 +176,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
176176
177177 if (crit_temp > emerg_temp ) {
178178 dev_warn (dev , "%s : Critical threshold %d is above emergency threshold %d\n" ,
179- tz -> tzdev -> type , crit_temp , emerg_temp );
179+ thermal_zone_device_type ( tz -> tzdev ) , crit_temp , emerg_temp );
180180 return 0 ;
181181 }
182182
@@ -200,7 +200,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
200200static int mlxsw_thermal_bind (struct thermal_zone_device * tzdev ,
201201 struct thermal_cooling_device * cdev )
202202{
203- struct mlxsw_thermal * thermal = tzdev -> devdata ;
203+ struct mlxsw_thermal * thermal = thermal_zone_device_priv ( tzdev ) ;
204204 struct device * dev = thermal -> bus_info -> dev ;
205205 int i , err ;
206206
@@ -226,7 +226,7 @@ static int mlxsw_thermal_bind(struct thermal_zone_device *tzdev,
226226static int mlxsw_thermal_unbind (struct thermal_zone_device * tzdev ,
227227 struct thermal_cooling_device * cdev )
228228{
229- struct mlxsw_thermal * thermal = tzdev -> devdata ;
229+ struct mlxsw_thermal * thermal = thermal_zone_device_priv ( tzdev ) ;
230230 struct device * dev = thermal -> bus_info -> dev ;
231231 int i ;
232232 int err ;
@@ -248,7 +248,7 @@ static int mlxsw_thermal_unbind(struct thermal_zone_device *tzdev,
248248static int mlxsw_thermal_get_temp (struct thermal_zone_device * tzdev ,
249249 int * p_temp )
250250{
251- struct mlxsw_thermal * thermal = tzdev -> devdata ;
251+ struct mlxsw_thermal * thermal = thermal_zone_device_priv ( tzdev ) ;
252252 struct device * dev = thermal -> bus_info -> dev ;
253253 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
254254 int temp ;
@@ -280,7 +280,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_ops = {
280280static int mlxsw_thermal_module_bind (struct thermal_zone_device * tzdev ,
281281 struct thermal_cooling_device * cdev )
282282{
283- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
283+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
284284 struct mlxsw_thermal * thermal = tz -> parent ;
285285 int i , j , err ;
286286
@@ -309,7 +309,7 @@ static int mlxsw_thermal_module_bind(struct thermal_zone_device *tzdev,
309309static int mlxsw_thermal_module_unbind (struct thermal_zone_device * tzdev ,
310310 struct thermal_cooling_device * cdev )
311311{
312- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
312+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
313313 struct mlxsw_thermal * thermal = tz -> parent ;
314314 int i ;
315315 int err ;
@@ -355,7 +355,7 @@ mlxsw_thermal_module_temp_and_thresholds_get(struct mlxsw_core *core,
355355static int mlxsw_thermal_module_temp_get (struct thermal_zone_device * tzdev ,
356356 int * p_temp )
357357{
358- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
358+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
359359 struct mlxsw_thermal * thermal = tz -> parent ;
360360 int temp , crit_temp , emerg_temp ;
361361 struct device * dev ;
@@ -390,7 +390,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_module_ops = {
390390static int mlxsw_thermal_gearbox_temp_get (struct thermal_zone_device * tzdev ,
391391 int * p_temp )
392392{
393- struct mlxsw_thermal_module * tz = tzdev -> devdata ;
393+ struct mlxsw_thermal_module * tz = thermal_zone_device_priv ( tzdev ) ;
394394 struct mlxsw_thermal * thermal = tz -> parent ;
395395 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
396396 u16 index ;
0 commit comments