diff options
Diffstat (limited to 'drivers/input/input-polldev.c')
| -rw-r--r-- | drivers/input/input-polldev.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index aa6713b4a988..291d9393d359 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c  | |||
| @@ -100,6 +100,12 @@ static void input_close_polled_device(struct input_dev *input) | |||
| 100 | struct input_polled_dev *dev = input_get_drvdata(input); | 100 | struct input_polled_dev *dev = input_get_drvdata(input); | 
| 101 | 101 | ||
| 102 | cancel_delayed_work_sync(&dev->work); | 102 | cancel_delayed_work_sync(&dev->work); | 
| 103 | /* | ||
| 104 | * Clean up work struct to remove references to the workqueue. | ||
| 105 | * It may be destroyed by the next call. This causes problems | ||
| 106 | * at next device open-close in case of poll_interval == 0. | ||
| 107 | */ | ||
| 108 | INIT_DELAYED_WORK(&dev->work, dev->work.work.func); | ||
| 103 | input_polldev_stop_workqueue(); | 109 | input_polldev_stop_workqueue(); | 
| 104 | 110 | ||
| 105 | if (dev->close) | 111 | if (dev->close) | 
