aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/input-polldev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c
index 490918a5d192..0d3ce7a50fb1 100644
--- a/drivers/input/input-polldev.c
+++ b/drivers/input/input-polldev.c
@@ -73,7 +73,7 @@ static void input_polled_device_work(struct work_struct *work)
73 73
74static int input_open_polled_device(struct input_dev *input) 74static int input_open_polled_device(struct input_dev *input)
75{ 75{
76 struct input_polled_dev *dev = input->private; 76 struct input_polled_dev *dev = input_get_drvdata(input);
77 int error; 77 int error;
78 78
79 error = input_polldev_start_workqueue(); 79 error = input_polldev_start_workqueue();
@@ -91,7 +91,7 @@ static int input_open_polled_device(struct input_dev *input)
91 91
92static void input_close_polled_device(struct input_dev *input) 92static void input_close_polled_device(struct input_dev *input)
93{ 93{
94 struct input_polled_dev *dev = input->private; 94 struct input_polled_dev *dev = input_get_drvdata(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();
@@ -151,10 +151,10 @@ int input_register_polled_device(struct input_polled_dev *dev)
151{ 151{
152 struct input_dev *input = dev->input; 152 struct input_dev *input = dev->input;
153 153
154 input_set_drvdata(input, dev);
154 INIT_DELAYED_WORK(&dev->work, input_polled_device_work); 155 INIT_DELAYED_WORK(&dev->work, input_polled_device_work);
155 if (!dev->poll_interval) 156 if (!dev->poll_interval)
156 dev->poll_interval = 500; 157 dev->poll_interval = 500;
157 input->private = dev;
158 input->open = input_open_polled_device; 158 input->open = input_open_polled_device;
159 input->close = input_close_polled_device; 159 input->close = input_close_polled_device;
160 160