diff options
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/tps6507x-ts.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 5de80a1a730..5b70a1419b4 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c | |||
@@ -221,7 +221,7 @@ done: | |||
221 | 221 | ||
222 | if (poll) { | 222 | if (poll) { |
223 | schd = queue_delayed_work(tsc->wq, &tsc->work, | 223 | schd = queue_delayed_work(tsc->wq, &tsc->work, |
224 | tsc->poll_period * HZ / 1000); | 224 | msecs_to_jiffies(tsc->poll_period)); |
225 | if (schd) | 225 | if (schd) |
226 | tsc->polling = 1; | 226 | tsc->polling = 1; |
227 | else { | 227 | else { |
@@ -326,7 +326,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
326 | goto err2; | 326 | goto err2; |
327 | 327 | ||
328 | schd = queue_delayed_work(tsc->wq, &tsc->work, | 328 | schd = queue_delayed_work(tsc->wq, &tsc->work, |
329 | tsc->poll_period * HZ / 1000); | 329 | msecs_to_jiffies(tsc->poll_period)); |
330 | 330 | ||
331 | if (schd) | 331 | if (schd) |
332 | tsc->polling = 1; | 332 | tsc->polling = 1; |
@@ -339,10 +339,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
339 | return 0; | 339 | return 0; |
340 | 340 | ||
341 | err2: | 341 | err2: |
342 | cancel_delayed_work(&tsc->work); | 342 | cancel_delayed_work_sync(&tsc->work); |
343 | flush_workqueue(tsc->wq); | ||
344 | destroy_workqueue(tsc->wq); | 343 | destroy_workqueue(tsc->wq); |
345 | tsc->wq = 0; | ||
346 | input_free_device(input_dev); | 344 | input_free_device(input_dev); |
347 | err1: | 345 | err1: |
348 | kfree(tsc); | 346 | kfree(tsc); |
@@ -360,10 +358,8 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev) | |||
360 | if (!tsc) | 358 | if (!tsc) |
361 | return 0; | 359 | return 0; |
362 | 360 | ||
363 | cancel_delayed_work(&tsc->work); | 361 | cancel_delayed_work_sync(&tsc->work); |
364 | flush_workqueue(tsc->wq); | ||
365 | destroy_workqueue(tsc->wq); | 362 | destroy_workqueue(tsc->wq); |
366 | tsc->wq = 0; | ||
367 | 363 | ||
368 | input_free_device(input_dev); | 364 | input_free_device(input_dev); |
369 | 365 | ||