diff options
-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 b023eae3c3ec..2d03bf791ceb 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c | |||
@@ -292,7 +292,7 @@ static void ucb1x00_ts_irq(int idx, void *id) | |||
292 | 292 | ||
293 | static int ucb1x00_ts_open(struct input_dev *idev) | 293 | static int ucb1x00_ts_open(struct input_dev *idev) |
294 | { | 294 | { |
295 | struct ucb1x00_ts *ts = idev->private; | 295 | struct ucb1x00_ts *ts = input_get_drvdata(idev); |
296 | int ret = 0; | 296 | int ret = 0; |
297 | 297 | ||
298 | BUG_ON(ts->rtask); | 298 | BUG_ON(ts->rtask); |
@@ -329,7 +329,7 @@ static int ucb1x00_ts_open(struct input_dev *idev) | |||
329 | */ | 329 | */ |
330 | static void ucb1x00_ts_close(struct input_dev *idev) | 330 | static void ucb1x00_ts_close(struct input_dev *idev) |
331 | { | 331 | { |
332 | struct ucb1x00_ts *ts = idev->private; | 332 | struct ucb1x00_ts *ts = input_get_drvdata(idev); |
333 | 333 | ||
334 | if (ts->rtask) | 334 | if (ts->rtask) |
335 | kthread_stop(ts->rtask); | 335 | kthread_stop(ts->rtask); |
@@ -381,7 +381,6 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) | |||
381 | ts->idev = idev; | 381 | ts->idev = idev; |
382 | ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; | 382 | ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; |
383 | 383 | ||
384 | idev->private = ts; | ||
385 | idev->name = "Touchscreen panel"; | 384 | idev->name = "Touchscreen panel"; |
386 | idev->id.product = ts->ucb->id; | 385 | idev->id.product = ts->ucb->id; |
387 | idev->open = ucb1x00_ts_open; | 386 | idev->open = ucb1x00_ts_open; |
@@ -392,6 +391,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) | |||
392 | __set_bit(ABS_Y, idev->absbit); | 391 | __set_bit(ABS_Y, idev->absbit); |
393 | __set_bit(ABS_PRESSURE, idev->absbit); | 392 | __set_bit(ABS_PRESSURE, idev->absbit); |
394 | 393 | ||
394 | input_set_drvdata(idev, ts); | ||
395 | |||
395 | err = input_register_device(idev); | 396 | err = input_register_device(idev); |
396 | if (err) | 397 | if (err) |
397 | goto fail; | 398 | goto fail; |