diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-04 16:27:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-04 16:27:33 -0400 |
commit | 0b662c64840fb281e5948ab6f9d60f84817277d0 (patch) | |
tree | 169f6bf2c3c9f3a7a69b0ee3785cfcd866e12329 | |
parent | 45efebf2492187e8915e2876c5bf6f3803b1c23f (diff) | |
parent | 1dfa2812404c37d7571622195f907cea3331616c (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
-rw-r--r-- | drivers/input/evdev.c | 2 | ||||
-rw-r--r-- | drivers/input/joydev.c | 2 | ||||
-rw-r--r-- | drivers/input/joystick/db9.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 2 | ||||
-rw-r--r-- | drivers/input/tsdev.c | 2 | ||||
-rw-r--r-- | drivers/mfd/ucb1x00-ts.c | 7 |
7 files changed, 10 insertions, 9 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index b234729706be..be6b93c20f60 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -699,9 +699,9 @@ static void evdev_disconnect(struct input_handle *handle) | |||
699 | if (evdev->open) { | 699 | if (evdev->open) { |
700 | input_flush_device(handle, NULL); | 700 | input_flush_device(handle, NULL); |
701 | input_close_device(handle); | 701 | input_close_device(handle); |
702 | wake_up_interruptible(&evdev->wait); | ||
703 | list_for_each_entry(client, &evdev->client_list, node) | 702 | list_for_each_entry(client, &evdev->client_list, node) |
704 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); | 703 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); |
704 | wake_up_interruptible(&evdev->wait); | ||
705 | } else | 705 | } else |
706 | evdev_free(evdev); | 706 | evdev_free(evdev); |
707 | } | 707 | } |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 06f0541b24da..10e3b7bc925f 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -594,9 +594,9 @@ static void joydev_disconnect(struct input_handle *handle) | |||
594 | 594 | ||
595 | if (joydev->open) { | 595 | if (joydev->open) { |
596 | input_close_device(handle); | 596 | input_close_device(handle); |
597 | wake_up_interruptible(&joydev->wait); | ||
598 | list_for_each_entry(client, &joydev->client_list, node) | 597 | list_for_each_entry(client, &joydev->client_list, node) |
599 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); | 598 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); |
599 | wake_up_interruptible(&joydev->wait); | ||
600 | } else | 600 | } else |
601 | joydev_free(joydev); | 601 | joydev_free(joydev); |
602 | } | 602 | } |
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 86ad1027e12a..b069ee18e353 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c | |||
@@ -54,7 +54,7 @@ static struct db9_config db9_cfg[DB9_MAX_PORTS] __initdata; | |||
54 | 54 | ||
55 | module_param_array_named(dev, db9_cfg[0].args, int, &db9_cfg[0].nargs, 0); | 55 | module_param_array_named(dev, db9_cfg[0].args, int, &db9_cfg[0].nargs, 0); |
56 | MODULE_PARM_DESC(dev, "Describes first attached device (<parport#>,<type>)"); | 56 | MODULE_PARM_DESC(dev, "Describes first attached device (<parport#>,<type>)"); |
57 | module_param_array_named(dev2, db9_cfg[1].args, int, &db9_cfg[0].nargs, 0); | 57 | module_param_array_named(dev2, db9_cfg[1].args, int, &db9_cfg[1].nargs, 0); |
58 | MODULE_PARM_DESC(dev2, "Describes second attached device (<parport#>,<type>)"); | 58 | MODULE_PARM_DESC(dev2, "Describes second attached device (<parport#>,<type>)"); |
59 | module_param_array_named(dev3, db9_cfg[2].args, int, &db9_cfg[2].nargs, 0); | 59 | module_param_array_named(dev3, db9_cfg[2].args, int, &db9_cfg[2].nargs, 0); |
60 | MODULE_PARM_DESC(dev3, "Describes third attached device (<parport#>,<type>)"); | 60 | MODULE_PARM_DESC(dev3, "Describes third attached device (<parport#>,<type>)"); |
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index eb0167e9f0cb..50e06e8dd05d 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig | |||
@@ -48,7 +48,7 @@ config MOUSE_PS2_ALPS | |||
48 | If unsure, say Y. | 48 | If unsure, say Y. |
49 | 49 | ||
50 | config MOUSE_PS2_LOGIPS2PP | 50 | config MOUSE_PS2_LOGIPS2PP |
51 | bool "Logictech PS/2++ mouse protocol extension" if EMBEDDED | 51 | bool "Logitech PS/2++ mouse protocol extension" if EMBEDDED |
52 | default y | 52 | default y |
53 | depends on MOUSE_PS2 | 53 | depends on MOUSE_PS2 |
54 | help | 54 | help |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 8675f9509393..3f4866d8d18c 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -766,9 +766,9 @@ static void mousedev_disconnect(struct input_handle *handle) | |||
766 | 766 | ||
767 | if (mousedev->open) { | 767 | if (mousedev->open) { |
768 | input_close_device(handle); | 768 | input_close_device(handle); |
769 | wake_up_interruptible(&mousedev->wait); | ||
770 | list_for_each_entry(client, &mousedev->client_list, node) | 769 | list_for_each_entry(client, &mousedev->client_list, node) |
771 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); | 770 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); |
771 | wake_up_interruptible(&mousedev->wait); | ||
772 | } else | 772 | } else |
773 | mousedev_free(mousedev); | 773 | mousedev_free(mousedev); |
774 | } | 774 | } |
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index 8238b13874c2..2db364898e15 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
@@ -476,9 +476,9 @@ static void tsdev_disconnect(struct input_handle *handle) | |||
476 | 476 | ||
477 | if (tsdev->open) { | 477 | if (tsdev->open) { |
478 | input_close_device(handle); | 478 | input_close_device(handle); |
479 | wake_up_interruptible(&tsdev->wait); | ||
480 | list_for_each_entry(client, &tsdev->client_list, node) | 479 | list_for_each_entry(client, &tsdev->client_list, node) |
481 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); | 480 | kill_fasync(&client->fasync, SIGIO, POLL_HUP); |
481 | wake_up_interruptible(&tsdev->wait); | ||
482 | } else | 482 | } else |
483 | tsdev_free(tsdev); | 483 | tsdev_free(tsdev); |
484 | } | 484 | } |
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; |