File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
drivers/net/ethernet/chelsio/cxgb4 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ static struct thermal_zone_device_ops cxgb4_thermal_ops = {
62
62
int cxgb4_thermal_init (struct adapter * adap )
63
63
{
64
64
struct ch_thermal * ch_thermal = & adap -> ch_thermal ;
65
+ char ch_tz_name [THERMAL_NAME_LENGTH ];
65
66
int num_trip = CXGB4_NUM_TRIPS ;
66
67
u32 param , val ;
67
68
int ret ;
@@ -82,7 +83,8 @@ int cxgb4_thermal_init(struct adapter *adap)
82
83
ch_thermal -> trip_type = THERMAL_TRIP_CRITICAL ;
83
84
}
84
85
85
- ch_thermal -> tzdev = thermal_zone_device_register ("cxgb4" , num_trip ,
86
+ snprintf (ch_tz_name , sizeof (ch_tz_name ), "cxgb4_%s" , adap -> name );
87
+ ch_thermal -> tzdev = thermal_zone_device_register (ch_tz_name , num_trip ,
86
88
0 , adap ,
87
89
& cxgb4_thermal_ops ,
88
90
NULL , 0 , 0 );
@@ -105,7 +107,9 @@ int cxgb4_thermal_init(struct adapter *adap)
105
107
106
108
int cxgb4_thermal_remove (struct adapter * adap )
107
109
{
108
- if (adap -> ch_thermal .tzdev )
110
+ if (adap -> ch_thermal .tzdev ) {
109
111
thermal_zone_device_unregister (adap -> ch_thermal .tzdev );
112
+ adap -> ch_thermal .tzdev = NULL ;
113
+ }
110
114
return 0 ;
111
115
}
You can’t perform that action at this time.
0 commit comments