aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-08-21 16:18:24 -0400
committerTejun Heo <tj@kernel.org>2012-08-21 16:18:24 -0400
commite7c2f967445dd2041f0f8e3179cca22bb8bb7f79 (patch)
treecb6c1d3593d2497e740d313f55592f41e8ae2039 /drivers/input/mouse
parente0aecdd874d78b7129a64b056c20e529e2c916df (diff)
workqueue: use mod_delayed_work() instead of __cancel + queue
Now that mod_delayed_work() is safe to call from IRQ handlers, __cancel_delayed_work() followed by queue_delayed_work() can be replaced with mod_delayed_work(). Most conversions are straight-forward except for the following. * net/core/link_watch.c: linkwatch_schedule_work() was doing a quite elaborate dancing around its delayed_work. Collapse it such that linkwatch_work is queued for immediate execution if LW_URGENT and existing timer is kept otherwise. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/synaptics_i2c.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c
index f14675702c0f..063a174d3a88 100644
--- a/drivers/input/mouse/synaptics_i2c.c
+++ b/drivers/input/mouse/synaptics_i2c.c
@@ -376,12 +376,7 @@ static void synaptics_i2c_reschedule_work(struct synaptics_i2c *touch,
376 376
377 spin_lock_irqsave(&touch->lock, flags); 377 spin_lock_irqsave(&touch->lock, flags);
378 378
379 /* 379 mod_delayed_work(system_wq, &touch->dwork, delay);
380 * If work is already scheduled then subsequent schedules will not
381 * change the scheduled time that's why we have to cancel it first.
382 */
383 __cancel_delayed_work(&touch->dwork);
384 schedule_delayed_work(&touch->dwork, delay);
385 380
386 spin_unlock_irqrestore(&touch->lock, flags); 381 spin_unlock_irqrestore(&touch->lock, flags);
387} 382}