Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-block.git] / drivers / input / touchscreen / cy8ctmg110_ts.c
index a93c5c26ab3fa7d858238d13b1c27e919958c8c9..d8815c5d54add6766c6583cdcdced63779bbf0a4 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 },
        { }
 };