projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e38de67
)
Input: send key up events at disconnect
author
Dmitry Torokhov
<dtor@insightbb.com>
Mon, 11 Sep 2006 01:56:06 +0000
(21:56 -0400)
committer
Dmitry Torokhov
<dtor@insightbb.com>
Mon, 11 Sep 2006 01:56:06 +0000
(21:56 -0400)
Emit key up events for all pressed keys/buttons when disconnecting
an input device. Cures "stuck" enter key effect when unloading
keyboard module.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/input.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/input/input.c
b/drivers/input/input.c
index 1fc0517e9428ca21e3b058539df656e00311e416..1c71dd6fe5cdac5457560b539ef3900c80fc6b1d 100644
(file)
--- a/
drivers/input/input.c
+++ b/
drivers/input/input.c
@@
-1014,9
+1014,12
@@
EXPORT_SYMBOL(input_register_device);
void input_unregister_device(struct input_dev *dev)
{
struct list_head *node, *next;
+ int code;
- if (!dev)
- return;
+ for (code = 0; code <= KEY_MAX; code++)
+ if (test_bit(code, dev->key))
+ input_report_key(dev, code, 0);
+ input_sync(dev);
del_timer_sync(&dev->timer);
This page took
0.025759 seconds
and
5
git commands to generate.