aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ucb1x00-ts.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index a984c0efabf0..551061c2eadf 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -59,16 +59,18 @@ static int adcsync;
59 59
60static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y) 60static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y)
61{ 61{
62 input_report_abs(ts->idev, ABS_X, x); 62 struct input_dev *idev = ts->idev;
63 input_report_abs(ts->idev, ABS_Y, y); 63 input_report_abs(idev, ABS_X, x);
64 input_report_abs(ts->idev, ABS_PRESSURE, pressure); 64 input_report_abs(idev, ABS_Y, y);
65 input_sync(ts->idev); 65 input_report_abs(idev, ABS_PRESSURE, pressure);
66 input_sync(idev);
66} 67}
67 68
68static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts) 69static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
69{ 70{
70 input_report_abs(ts->idev, ABS_PRESSURE, 0); 71 struct input_dev *idev = ts->idev;
71 input_sync(ts->idev); 72 input_report_abs(idev, ABS_PRESSURE, 0);
73 input_sync(idev);
72} 74}
73 75
74/* 76/*
@@ -297,7 +299,7 @@ static void ucb1x00_ts_irq(int idx, void *id)
297 299
298static int ucb1x00_ts_open(struct input_dev *idev) 300static int ucb1x00_ts_open(struct input_dev *idev)
299{ 301{
300 struct ucb1x00_ts *ts = (struct ucb1x00_ts *)idev; 302 struct ucb1x00_ts *ts = idev->private;
301 int ret = 0; 303 int ret = 0;
302 304
303 BUG_ON(ts->rtask); 305 BUG_ON(ts->rtask);
@@ -334,7 +336,7 @@ static int ucb1x00_ts_open(struct input_dev *idev)
334 */ 336 */
335static void ucb1x00_ts_close(struct input_dev *idev) 337static void ucb1x00_ts_close(struct input_dev *idev)
336{ 338{
337 struct ucb1x00_ts *ts = (struct ucb1x00_ts *)idev; 339 struct ucb1x00_ts *ts = idev->private;
338 340
339 if (ts->rtask) 341 if (ts->rtask)
340 kthread_stop(ts->rtask); 342 kthread_stop(ts->rtask);
@@ -386,6 +388,7 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
386 ts->ucb = dev->ucb; 388 ts->ucb = dev->ucb;
387 ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; 389 ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
388 390
391 ts->idev->private = ts;
389 ts->idev->name = "Touchscreen panel"; 392 ts->idev->name = "Touchscreen panel";
390 ts->idev->id.product = ts->ucb->id; 393 ts->idev->id.product = ts->ucb->id;
391 ts->idev->open = ucb1x00_ts_open; 394 ts->idev->open = ucb1x00_ts_open;