diff options
author | Samu Onkalo <samu.p.onkalo@nokia.com> | 2009-10-18 03:38:57 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-10-18 03:46:49 -0400 |
commit | b0aba1e66c38d64be2c7dbf4b08c71857031ab67 (patch) | |
tree | 1691861b033ef42331b30711a466025719f357c8 /drivers/input/input-polldev.c | |
parent | bc09dcadc1a3da87d58aa70ebc8e9441205be75c (diff) |
Input: add open and close methods for polled devices
Optional open and close methods for preparing and closing
the device.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/input-polldev.c')
-rw-r--r-- | drivers/input/input-polldev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 0d3ce7a50fb1..910220c127cb 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c | |||
@@ -80,8 +80,8 @@ static int input_open_polled_device(struct input_dev *input) | |||
80 | if (error) | 80 | if (error) |
81 | return error; | 81 | return error; |
82 | 82 | ||
83 | if (dev->flush) | 83 | if (dev->open) |
84 | dev->flush(dev); | 84 | dev->open(dev); |
85 | 85 | ||
86 | queue_delayed_work(polldev_wq, &dev->work, | 86 | queue_delayed_work(polldev_wq, &dev->work, |
87 | msecs_to_jiffies(dev->poll_interval)); | 87 | msecs_to_jiffies(dev->poll_interval)); |
@@ -95,6 +95,9 @@ static void input_close_polled_device(struct input_dev *input) | |||
95 | 95 | ||
96 | cancel_delayed_work_sync(&dev->work); | 96 | cancel_delayed_work_sync(&dev->work); |
97 | input_polldev_stop_workqueue(); | 97 | input_polldev_stop_workqueue(); |
98 | |||
99 | if (dev->close) | ||
100 | dev->close(dev); | ||
98 | } | 101 | } |
99 | 102 | ||
100 | /** | 103 | /** |