Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[pandora-kernel.git] / drivers / input / touchscreen / cy8ctmg110_ts.c
index a93c5c2..d8815c5 100644 (file)
@@ -84,9 +84,9 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, unsigned char reg,
        memcpy(i2c_data + 1, value, len);
 
        ret = i2c_master_send(client, i2c_data, len + 1);
-       if (ret != 1) {
+       if (ret != len + 1) {
                dev_err(&client->dev, "i2c write data cmd failed\n");
-               return ret ? ret : -EIO;
+               return ret < 0 ? ret : -EIO;
        }
 
        return 0;
@@ -193,6 +193,8 @@ static int __devinit cy8ctmg110_probe(struct i2c_client *client,
 
        ts->client = client;
        ts->input = input_dev;
+       ts->reset_pin = pdata->reset_pin;
+       ts->irq_pin = pdata->irq_pin;
 
        snprintf(ts->phys, sizeof(ts->phys),
                 "%s/input0", dev_name(&client->dev));
@@ -328,7 +330,7 @@ static int __devexit cy8ctmg110_remove(struct i2c_client *client)
        return 0;
 }
 
-static struct i2c_device_id cy8ctmg110_idtable[] = {
+static const struct i2c_device_id cy8ctmg110_idtable[] = {
        { CY8CTMG110_DRIVER_NAME, 1 },
        { }
 };