diff options
author | Shubhrajyoti Datta <omaplinuxkernel@gmail.com> | 2012-10-10 12:34:00 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-11 03:48:48 -0400 |
commit | 9493d974b0f1f34903adfb529a510d4d768493dc (patch) | |
tree | b3551a4f6c42dab55b242db813e1045197252b41 | |
parent | 7f8d4cad1e4e11a45d02bd6e024cc2812963c38a (diff) |
Input: cy8ctmg110_ts - use C99-style structure initializators
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Thanks to Julia Lawall <julia.lawall@lip6.fr> for automating the
conversion.
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/touchscreen/cy8ctmg110_ts.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 464f1bf4b61d..ad6a6640f385 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, | |||
99 | int ret; | 99 | int ret; |
100 | struct i2c_msg msg[2] = { | 100 | struct i2c_msg msg[2] = { |
101 | /* first write slave position to i2c devices */ | 101 | /* first write slave position to i2c devices */ |
102 | { client->addr, 0, 1, &cmd }, | 102 | { |
103 | .addr = client->addr, | ||
104 | .len = 1, | ||
105 | .buf = &cmd | ||
106 | }, | ||
103 | /* Second read data from position */ | 107 | /* Second read data from position */ |
104 | { client->addr, I2C_M_RD, len, data } | 108 | { |
109 | .addr = client->addr, | ||
110 | .flags = I2C_M_RD, | ||
111 | .len = len, | ||
112 | .buf = data | ||
113 | } | ||
105 | }; | 114 | }; |
106 | 115 | ||
107 | ret = i2c_transfer(client->adapter, msg, 2); | 116 | ret = i2c_transfer(client->adapter, msg, 2); |