diff options
-rw-r--r-- | drivers/input/touchscreen/auo-pixcir-ts.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index 6317a9c7884c..c0a2483b30cb 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c | |||
@@ -111,6 +111,7 @@ | |||
111 | struct auo_pixcir_ts { | 111 | struct auo_pixcir_ts { |
112 | struct i2c_client *client; | 112 | struct i2c_client *client; |
113 | struct input_dev *input; | 113 | struct input_dev *input; |
114 | const struct auo_pixcir_ts_platdata *pdata; | ||
114 | char phys[32]; | 115 | char phys[32]; |
115 | 116 | ||
116 | /* special handling for touch_indicate interupt mode */ | 117 | /* special handling for touch_indicate interupt mode */ |
@@ -132,7 +133,7 @@ static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts, | |||
132 | struct auo_point_t *point) | 133 | struct auo_point_t *point) |
133 | { | 134 | { |
134 | struct i2c_client *client = ts->client; | 135 | struct i2c_client *client = ts->client; |
135 | const struct auo_pixcir_ts_platdata *pdata = client->dev.platform_data; | 136 | const struct auo_pixcir_ts_platdata *pdata = ts->pdata; |
136 | uint8_t raw_coord[8]; | 137 | uint8_t raw_coord[8]; |
137 | uint8_t raw_area[4]; | 138 | uint8_t raw_area[4]; |
138 | int i, ret; | 139 | int i, ret; |
@@ -178,8 +179,7 @@ static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts, | |||
178 | static irqreturn_t auo_pixcir_interrupt(int irq, void *dev_id) | 179 | static irqreturn_t auo_pixcir_interrupt(int irq, void *dev_id) |
179 | { | 180 | { |
180 | struct auo_pixcir_ts *ts = dev_id; | 181 | struct auo_pixcir_ts *ts = dev_id; |
181 | struct i2c_client *client = ts->client; | 182 | const struct auo_pixcir_ts_platdata *pdata = ts->pdata; |
182 | const struct auo_pixcir_ts_platdata *pdata = client->dev.platform_data; | ||
183 | struct auo_point_t point[AUO_PIXCIR_REPORT_POINTS]; | 183 | struct auo_point_t point[AUO_PIXCIR_REPORT_POINTS]; |
184 | int i; | 184 | int i; |
185 | int ret; | 185 | int ret; |
@@ -290,7 +290,7 @@ static int auo_pixcir_int_config(struct auo_pixcir_ts *ts, | |||
290 | int int_setting) | 290 | int int_setting) |
291 | { | 291 | { |
292 | struct i2c_client *client = ts->client; | 292 | struct i2c_client *client = ts->client; |
293 | struct auo_pixcir_ts_platdata *pdata = client->dev.platform_data; | 293 | const struct auo_pixcir_ts_platdata *pdata = ts->pdata; |
294 | int ret; | 294 | int ret; |
295 | 295 | ||
296 | ret = i2c_smbus_read_byte_data(client, AUO_PIXCIR_REG_INT_SETTING); | 296 | ret = i2c_smbus_read_byte_data(client, AUO_PIXCIR_REG_INT_SETTING); |
@@ -527,6 +527,7 @@ static int auo_pixcir_probe(struct i2c_client *client, | |||
527 | 527 | ||
528 | msleep(200); | 528 | msleep(200); |
529 | 529 | ||
530 | ts->pdata = pdata; | ||
530 | ts->client = client; | 531 | ts->client = client; |
531 | ts->touch_ind_mode = 0; | 532 | ts->touch_ind_mode = 0; |
532 | init_waitqueue_head(&ts->wait); | 533 | init_waitqueue_head(&ts->wait); |
@@ -624,7 +625,7 @@ err_gpio_int: | |||
624 | static int auo_pixcir_remove(struct i2c_client *client) | 625 | static int auo_pixcir_remove(struct i2c_client *client) |
625 | { | 626 | { |
626 | struct auo_pixcir_ts *ts = i2c_get_clientdata(client); | 627 | struct auo_pixcir_ts *ts = i2c_get_clientdata(client); |
627 | const struct auo_pixcir_ts_platdata *pdata = client->dev.platform_data; | 628 | const struct auo_pixcir_ts_platdata *pdata = ts->pdata; |
628 | 629 | ||
629 | free_irq(client->irq, ts); | 630 | free_irq(client->irq, ts); |
630 | 631 | ||