summaryrefslogtreecommitdiff
path: root/drivers/input/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 1fc0517e9428..1c71dd6fe5cd 100644
--- 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);