diff options
author | Xi Wang <xi.wang@gmail.com> | 2011-12-21 03:57:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-21 21:46:22 +0100 |
commit | 7d6c429b263c2f735f3df8c282cc77a8659e5d74 (patch) | |
tree | bacd15d0f680661de4ba72f167df5052f1cf0ecf /net/irda | |
parent | stmmac: update the driver's documentation (Dec-2011) (diff) | |
download | linux-7d6c429b263c2f735f3df8c282cc77a8659e5d74.tar.xz linux-7d6c429b263c2f735f3df8c282cc77a8659e5d74.zip |
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.c | 4 |
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: self->errno = 0; setup_timer(&self->watchdog, irda_discovery_timeout, (unsigned long)self); - self->watchdog.expires = jiffies + (val * HZ/1000); - add_timer(&(self->watchdog)); + mod_timer(&self->watchdog, + jiffies + msecs_to_jiffies(val)); /* Wait for IR-LMP to call us back */ __wait_event_interruptible(self->query_wait, |