]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
misc: nct1008: use signed long for temp
authorDiwakar Tundlam <dtundlam@nvidia.com>
Thu, 20 Mar 2014 22:33:31 +0000 (15:33 -0700)
committerMatthew Pedro <mapedro@nvidia.com>
Fri, 4 Apr 2014 21:36:56 +0000 (14:36 -0700)
Avoid setting signed temperature value into unsigned long pointer

Bug 1454792

Change-Id: I583f2296c294b6d499fcdf8e1b9338cce5b8344d
Reviewed-on: http://git-master/r/384655
(cherry picked from commit 72ccbb69fcf0375ce7a26db7c32dd3dd925a6f26)
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/392044
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
drivers/misc/nct1008.c

index 140f55634d6ca365f19837597ba03ec1d1b47eb4..f6cc4426a0afbc55e92bdb2e5e615d3603ee15f5 100644 (file)
@@ -163,7 +163,7 @@ static int nct1008_read_reg(struct i2c_client *client, u8 reg)
 }
 
 static int nct1008_ext_get_temp_common(struct nct1008_data *data,
-                                       unsigned long *temp)
+                                       long *temp)
 {
        struct i2c_client *client = data->client;
        struct nct1008_platform_data *pdata = client->dev.platform_data;
@@ -572,7 +572,7 @@ static int nct1008_shutdown_warning_get_cur_state(
 {
        struct nct1008_data *data = cdev->devdata;
        long ext_limit = data->plat_data.shutdown_ext_limit * 1000;
-       unsigned long temp;
+       long temp;
 
        if (nct1008_ext_get_temp_common(data, &temp))
                return -1;
@@ -592,7 +592,7 @@ static int nct1008_shutdown_warning_set_cur_state(
        static long temp_sav;
        struct nct1008_data *data = cdev->devdata;
        long ext_limit = data->plat_data.shutdown_ext_limit * 1000;
-       unsigned long temp;
+       long temp;
 
        if (nct1008_ext_get_temp_common(data, &temp))
                return -1;