diff options
Diffstat (limited to 'drivers/mfd/ucb1x00-ts.c')
-rw-r--r-- | drivers/mfd/ucb1x00-ts.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 7772bd1d92b4..38e815a2e871 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c | |||
@@ -291,7 +291,7 @@ static void ucb1x00_ts_irq(int idx, void *id) | |||
291 | 291 | ||
292 | static int ucb1x00_ts_open(struct input_dev *idev) | 292 | static int ucb1x00_ts_open(struct input_dev *idev) |
293 | { | 293 | { |
294 | struct ucb1x00_ts *ts = idev->private; | 294 | struct ucb1x00_ts *ts = input_get_drvdata(idev); |
295 | int ret = 0; | 295 | int ret = 0; |
296 | 296 | ||
297 | BUG_ON(ts->rtask); | 297 | BUG_ON(ts->rtask); |
@@ -328,7 +328,7 @@ static int ucb1x00_ts_open(struct input_dev *idev) | |||
328 | */ | 328 | */ |
329 | static void ucb1x00_ts_close(struct input_dev *idev) | 329 | static void ucb1x00_ts_close(struct input_dev *idev) |
330 | { | 330 | { |
331 | struct ucb1x00_ts *ts = idev->private; | 331 | struct ucb1x00_ts *ts = input_get_drvdata(idev); |
332 | 332 | ||
333 | if (ts->rtask) | 333 | if (ts->rtask) |
334 | kthread_stop(ts->rtask); | 334 | kthread_stop(ts->rtask); |
@@ -380,7 +380,6 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) | |||
380 | ts->idev = idev; | 380 | ts->idev = idev; |
381 | ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; | 381 | ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; |
382 | 382 | ||
383 | idev->private = ts; | ||
384 | idev->name = "Touchscreen panel"; | 383 | idev->name = "Touchscreen panel"; |
385 | idev->id.product = ts->ucb->id; | 384 | idev->id.product = ts->ucb->id; |
386 | idev->open = ucb1x00_ts_open; | 385 | idev->open = ucb1x00_ts_open; |
@@ -391,6 +390,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) | |||
391 | __set_bit(ABS_Y, idev->absbit); | 390 | __set_bit(ABS_Y, idev->absbit); |
392 | __set_bit(ABS_PRESSURE, idev->absbit); | 391 | __set_bit(ABS_PRESSURE, idev->absbit); |
393 | 392 | ||
393 | input_set_drvdata(idev, ts); | ||
394 | |||
394 | err = input_register_device(idev); | 395 | err = input_register_device(idev); |
395 | if (err) | 396 | if (err) |
396 | goto fail; | 397 | goto fail; |