From 7d6c429b263c2f735f3df8c282cc77a8659e5d74 Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Wed, 21 Dec 2011 02:57:16 +0000 Subject: irda: use msecs_to_jiffies() rather than manual calculation Also use mod_timer() instead of direct assignment to "expires". Signed-off-by: Xi Wang Signed-off-by: David S. Miller --- net/irda/af_irda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index c24f25ab67d..bb14c347768 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, -- cgit v1.2.3