aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hmc6352.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/misc/hmc6352.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/misc/hmc6352.c')
-rw-r--r--drivers/misc/hmc6352.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c
index 234bfcaf2099..ca938fc8a8d6 100644
--- a/drivers/misc/hmc6352.c
+++ b/drivers/misc/hmc6352.c
@@ -75,7 +75,7 @@ static ssize_t compass_heading_data_show(struct device *dev,
75{ 75{
76 struct i2c_client *client = to_i2c_client(dev); 76 struct i2c_client *client = to_i2c_client(dev);
77 unsigned char i2c_data[2]; 77 unsigned char i2c_data[2];
78 unsigned int ret; 78 int ret;
79 79
80 mutex_lock(&compass_mutex); 80 mutex_lock(&compass_mutex);
81 ret = compass_command(client, 'A'); 81 ret = compass_command(client, 'A');
@@ -86,7 +86,7 @@ static ssize_t compass_heading_data_show(struct device *dev,
86 msleep(10); /* sending 'A' cmd we need to wait for 7-10 millisecs */ 86 msleep(10); /* sending 'A' cmd we need to wait for 7-10 millisecs */
87 ret = i2c_master_recv(client, i2c_data, 2); 87 ret = i2c_master_recv(client, i2c_data, 2);
88 mutex_unlock(&compass_mutex); 88 mutex_unlock(&compass_mutex);
89 if (ret != 1) { 89 if (ret < 0) {
90 dev_warn(dev, "i2c read data cmd failed\n"); 90 dev_warn(dev, "i2c read data cmd failed\n");
91 return ret; 91 return ret;
92 } 92 }