aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2011-12-20 21:57:16 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-21 15:46:22 -0500
commit7d6c429b263c2f735f3df8c282cc77a8659e5d74 (patch)
treebacd15d0f680661de4ba72f167df5052f1cf0ecf /net/irda
parent5b9932685fa40088e989be0d56f7e41e362e9450 (diff)
irda: use msecs_to_jiffies() rather than manual calculation
Also use mod_timer() instead of direct assignment to "expires". Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/af_irda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index c24f25ab67d3..bb14c3477680 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -2558,8 +2558,8 @@ bed:
2558 self->errno = 0; 2558 self->errno = 0;
2559 setup_timer(&self->watchdog, irda_discovery_timeout, 2559 setup_timer(&self->watchdog, irda_discovery_timeout,
2560 (unsigned long)self); 2560 (unsigned long)self);
2561 self->watchdog.expires = jiffies + (val * HZ/1000); 2561 mod_timer(&self->watchdog,
2562 add_timer(&(self->watchdog)); 2562 jiffies + msecs_to_jiffies(val));
2563 2563
2564 /* Wait for IR-LMP to call us back */ 2564 /* Wait for IR-LMP to call us back */
2565 __wait_event_interruptible(self->query_wait, 2565 __wait_event_interruptible(self->query_wait,