diff options
Diffstat (limited to 'drivers/input/touchscreen/cy8ctmg110_ts.c')
-rw-r--r-- | drivers/input/touchscreen/cy8ctmg110_ts.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 464f1bf..96e0eedc 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -99,9 +99,18 @@ static int cy8ctmg110_read_regs(struct cy8ctmg110 *tsc, int ret; struct i2c_msg msg[2] = { /* first write slave position to i2c devices */ - { client->addr, 0, 1, &cmd }, + { + .addr = client->addr, + .len = 1, + .buf = &cmd + }, /* Second read data from position */ - { client->addr, I2C_M_RD, len, data } + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = len, + .buf = data + } }; ret = i2c_transfer(client->adapter, msg, 2); @@ -166,7 +175,7 @@ static irqreturn_t cy8ctmg110_irq_thread(int irq, void *dev_id) return IRQ_HANDLED; } -static int __devinit cy8ctmg110_probe(struct i2c_client *client, +static int cy8ctmg110_probe(struct i2c_client *client, const struct i2c_device_id *id) { const struct cy8ctmg110_pdata *pdata = client->dev.platform_data; @@ -314,7 +323,7 @@ static int cy8ctmg110_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cy8ctmg110_pm, cy8ctmg110_suspend, cy8ctmg110_resume); #endif -static int __devexit cy8ctmg110_remove(struct i2c_client *client) +static int cy8ctmg110_remove(struct i2c_client *client) { struct cy8ctmg110 *ts = i2c_get_clientdata(client); @@ -348,7 +357,7 @@ static struct i2c_driver cy8ctmg110_driver = { }, .id_table = cy8ctmg110_idtable, .probe = cy8ctmg110_probe, - .remove = __devexit_p(cy8ctmg110_remove), + .remove = cy8ctmg110_remove, }; module_i2c_driver(cy8ctmg110_driver); |