misc: nct1008: Correct names of thermal zone devices
Jinyoung Park [Tue, 28 May 2013 04:50:13 +0000 (13:50 +0900)]
Names of thermal zone devices are reversed between Tdiode and Tboard.

Bug 1261182
Bug 1296228

Change-Id: I4d318df4af73086172199528869a3136f889868a
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/233216
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyungwoo Yang <hyungwooy@nvidia.com>
Reviewed-by: Edward Riegelsberger <eriegels@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/misc/nct1008.c

index 31b1d19..bf17184 100644 (file)
@@ -1141,15 +1141,15 @@ static int __devinit nct1008_probe(struct i2c_client *client,
                mask |= (1 << i);
 
        if (data->plat_data.loc_name) {
-               strcpy(nct_int_name, "Tdiode_");
-               strcpy(nct_ext_name, "Tboard_");
+               strcpy(nct_int_name, "Tboard_");
+               strcpy(nct_ext_name, "Tdiode_");
                strncat(nct_int_name, data->plat_data.loc_name,
-                       (THERMAL_NAME_LENGTH - strlen("Tdiode_")) - 1);
-               strncat(nct_ext_name, data->plat_data.loc_name,
                        (THERMAL_NAME_LENGTH - strlen("Tboard_")) - 1);
+               strncat(nct_ext_name, data->plat_data.loc_name,
+                       (THERMAL_NAME_LENGTH - strlen("Tdiode_")) - 1);
        } else {
-               strcpy(nct_int_name, "Tdiode");
-               strcpy(nct_ext_name, "Tboard");
+               strcpy(nct_int_name, "Tboard");
+               strcpy(nct_ext_name, "Tdiode");
        }
 
        data->nct_int = thermal_zone_device_register(nct_int_name,