summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-10 08:41:58 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-10 08:41:58 -0700
commit5fc0d36c00e6a2d0a9f2a0a815cff5b9a13b080d (patch)
tree819d3f27a826f29210398615f4918a4cd9154836 /drivers/input/touchscreen
parentd01d0756f75e7a5b4b43764ad45b83c4340f11d6 (diff)
parent6ac8a99b906b01eaceef0057dbee4a225a32c423 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/cy8ctmg110_ts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c
index 4eb7df0b7f87..5ec0946938fe 100644
--- a/drivers/input/touchscreen/cy8ctmg110_ts.c
+++ b/drivers/input/touchscreen/cy8ctmg110_ts.c
@@ -75,7 +75,7 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, unsigned char reg,
unsigned char len, unsigned char *value)
{
struct i2c_client *client = tsc->client;
- unsigned int ret;
+ int ret;
unsigned char i2c_data[6];
BUG_ON(len > 5);
@@ -86,7 +86,7 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, unsigned char reg,
ret = i2c_master_send(client, i2c_data, len + 1);
if (ret != 1) {
dev_err(&client->dev, "i2c write data cmd failed\n");
- return ret;
+ return ret ? ret : -EIO;
}
return 0;
@@ -96,7 +96,7 @@ static int cy8ctmg110_read_regs(struct cy8ctmg110 *tsc,
unsigned char *data, unsigned char len, unsigned char cmd)
{
struct i2c_client *client = tsc->client;
- unsigned int ret;
+ int ret;
struct i2c_msg msg[2] = {
/* first write slave position to i2c devices */
{ client->addr, 0, 1, &cmd },