diff options
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 7 |
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); | |||
1014 | void input_unregister_device(struct input_dev *dev) | 1014 | void input_unregister_device(struct input_dev *dev) |
1015 | { | 1015 | { |
1016 | struct list_head *node, *next; | 1016 | struct list_head *node, *next; |
1017 | int code; | ||
1017 | 1018 | ||
1018 | if (!dev) | 1019 | for (code = 0; code <= KEY_MAX; code++) |
1019 | return; | 1020 | if (test_bit(code, dev->key)) |
1021 | input_report_key(dev, code, 0); | ||
1022 | input_sync(dev); | ||
1020 | 1023 | ||
1021 | del_timer_sync(&dev->timer); | 1024 | del_timer_sync(&dev->timer); |
1022 | 1025 | ||