aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-04 16:27:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-04 16:27:33 -0400
commit0b662c64840fb281e5948ab6f9d60f84817277d0 (patch)
tree169f6bf2c3c9f3a7a69b0ee3785cfcd866e12329 /drivers/mfd
parent45efebf2492187e8915e2876c5bf6f3803b1c23f (diff)
parent1dfa2812404c37d7571622195f907cea3331616c (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: reduce raciness when input handlers disconnect Input: ucb1x00 - do not access input_dev->private directly Input: logips2pp - fix typo in Kconfig Input: db9 - do not ignore dev2 module parameter
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ucb1x00-ts.c7
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
292static int ucb1x00_ts_open(struct input_dev *idev) 292static 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 */
329static void ucb1x00_ts_close(struct input_dev *idev) 329static 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;