Commit 0b662c64 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 45efebf2 1dfa2812
...@@ -699,9 +699,9 @@ static void evdev_disconnect(struct input_handle *handle) ...@@ -699,9 +699,9 @@ static void evdev_disconnect(struct input_handle *handle)
if (evdev->open) { if (evdev->open) {
input_flush_device(handle, NULL); input_flush_device(handle, NULL);
input_close_device(handle); input_close_device(handle);
wake_up_interruptible(&evdev->wait);
list_for_each_entry(client, &evdev->client_list, node) list_for_each_entry(client, &evdev->client_list, node)
kill_fasync(&client->fasync, SIGIO, POLL_HUP); kill_fasync(&client->fasync, SIGIO, POLL_HUP);
wake_up_interruptible(&evdev->wait);
} else } else
evdev_free(evdev); evdev_free(evdev);
} }
......
...@@ -594,9 +594,9 @@ static void joydev_disconnect(struct input_handle *handle) ...@@ -594,9 +594,9 @@ static void joydev_disconnect(struct input_handle *handle)
if (joydev->open) { if (joydev->open) {
input_close_device(handle); input_close_device(handle);
wake_up_interruptible(&joydev->wait);
list_for_each_entry(client, &joydev->client_list, node) list_for_each_entry(client, &joydev->client_list, node)
kill_fasync(&client->fasync, SIGIO, POLL_HUP); kill_fasync(&client->fasync, SIGIO, POLL_HUP);
wake_up_interruptible(&joydev->wait);
} else } else
joydev_free(joydev); joydev_free(joydev);
} }
......
...@@ -54,7 +54,7 @@ static struct db9_config db9_cfg[DB9_MAX_PORTS] __initdata; ...@@ -54,7 +54,7 @@ static struct db9_config db9_cfg[DB9_MAX_PORTS] __initdata;
module_param_array_named(dev, db9_cfg[0].args, int, &db9_cfg[0].nargs, 0); module_param_array_named(dev, db9_cfg[0].args, int, &db9_cfg[0].nargs, 0);
MODULE_PARM_DESC(dev, "Describes first attached device (<parport#>,<type>)"); MODULE_PARM_DESC(dev, "Describes first attached device (<parport#>,<type>)");
module_param_array_named(dev2, db9_cfg[1].args, int, &db9_cfg[0].nargs, 0); module_param_array_named(dev2, db9_cfg[1].args, int, &db9_cfg[1].nargs, 0);
MODULE_PARM_DESC(dev2, "Describes second attached device (<parport#>,<type>)"); MODULE_PARM_DESC(dev2, "Describes second attached device (<parport#>,<type>)");
module_param_array_named(dev3, db9_cfg[2].args, int, &db9_cfg[2].nargs, 0); module_param_array_named(dev3, db9_cfg[2].args, int, &db9_cfg[2].nargs, 0);
MODULE_PARM_DESC(dev3, "Describes third attached device (<parport#>,<type>)"); MODULE_PARM_DESC(dev3, "Describes third attached device (<parport#>,<type>)");
......
...@@ -48,7 +48,7 @@ config MOUSE_PS2_ALPS ...@@ -48,7 +48,7 @@ config MOUSE_PS2_ALPS
If unsure, say Y. If unsure, say Y.
config MOUSE_PS2_LOGIPS2PP config MOUSE_PS2_LOGIPS2PP
bool "Logictech PS/2++ mouse protocol extension" if EMBEDDED bool "Logitech PS/2++ mouse protocol extension" if EMBEDDED
default y default y
depends on MOUSE_PS2 depends on MOUSE_PS2
help help
......
...@@ -766,9 +766,9 @@ static void mousedev_disconnect(struct input_handle *handle) ...@@ -766,9 +766,9 @@ static void mousedev_disconnect(struct input_handle *handle)
if (mousedev->open) { if (mousedev->open) {
input_close_device(handle); input_close_device(handle);
wake_up_interruptible(&mousedev->wait);
list_for_each_entry(client, &mousedev->client_list, node) list_for_each_entry(client, &mousedev->client_list, node)
kill_fasync(&client->fasync, SIGIO, POLL_HUP); kill_fasync(&client->fasync, SIGIO, POLL_HUP);
wake_up_interruptible(&mousedev->wait);
} else } else
mousedev_free(mousedev); mousedev_free(mousedev);
} }
......
...@@ -476,9 +476,9 @@ static void tsdev_disconnect(struct input_handle *handle) ...@@ -476,9 +476,9 @@ static void tsdev_disconnect(struct input_handle *handle)
if (tsdev->open) { if (tsdev->open) {
input_close_device(handle); input_close_device(handle);
wake_up_interruptible(&tsdev->wait);
list_for_each_entry(client, &tsdev->client_list, node) list_for_each_entry(client, &tsdev->client_list, node)
kill_fasync(&client->fasync, SIGIO, POLL_HUP); kill_fasync(&client->fasync, SIGIO, POLL_HUP);
wake_up_interruptible(&tsdev->wait);
} else } else
tsdev_free(tsdev); tsdev_free(tsdev);
} }
......
...@@ -291,7 +291,7 @@ static void ucb1x00_ts_irq(int idx, void *id) ...@@ -291,7 +291,7 @@ static void ucb1x00_ts_irq(int idx, void *id)
static int ucb1x00_ts_open(struct input_dev *idev) static int ucb1x00_ts_open(struct input_dev *idev)
{ {
struct ucb1x00_ts *ts = idev->private; struct ucb1x00_ts *ts = input_get_drvdata(idev);
int ret = 0; int ret = 0;
BUG_ON(ts->rtask); BUG_ON(ts->rtask);
...@@ -328,7 +328,7 @@ static int ucb1x00_ts_open(struct input_dev *idev) ...@@ -328,7 +328,7 @@ static int ucb1x00_ts_open(struct input_dev *idev)
*/ */
static void ucb1x00_ts_close(struct input_dev *idev) static void ucb1x00_ts_close(struct input_dev *idev)
{ {
struct ucb1x00_ts *ts = idev->private; struct ucb1x00_ts *ts = input_get_drvdata(idev);
if (ts->rtask) if (ts->rtask)
kthread_stop(ts->rtask); kthread_stop(ts->rtask);
...@@ -380,7 +380,6 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) ...@@ -380,7 +380,6 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
ts->idev = idev; ts->idev = idev;
ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC; ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
idev->private = ts;
idev->name = "Touchscreen panel"; idev->name = "Touchscreen panel";
idev->id.product = ts->ucb->id; idev->id.product = ts->ucb->id;
idev->open = ucb1x00_ts_open; idev->open = ucb1x00_ts_open;
...@@ -391,6 +390,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) ...@@ -391,6 +390,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
__set_bit(ABS_Y, idev->absbit); __set_bit(ABS_Y, idev->absbit);
__set_bit(ABS_PRESSURE, idev->absbit); __set_bit(ABS_PRESSURE, idev->absbit);
input_set_drvdata(idev, ts);
err = input_register_device(idev); err = input_register_device(idev);
if (err) if (err)
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment