mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
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>
This commit is contained in:
parent
5b9932685f
commit
7d6c429b26
1 changed files with 2 additions and 2 deletions
|
@ -2558,8 +2558,8 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
|
||||||
self->errno = 0;
|
self->errno = 0;
|
||||||
setup_timer(&self->watchdog, irda_discovery_timeout,
|
setup_timer(&self->watchdog, irda_discovery_timeout,
|
||||||
(unsigned long)self);
|
(unsigned long)self);
|
||||||
self->watchdog.expires = jiffies + (val * HZ/1000);
|
mod_timer(&self->watchdog,
|
||||||
add_timer(&(self->watchdog));
|
jiffies + msecs_to_jiffies(val));
|
||||||
|
|
||||||
/* Wait for IR-LMP to call us back */
|
/* Wait for IR-LMP to call us back */
|
||||||
__wait_event_interruptible(self->query_wait,
|
__wait_event_interruptible(self->query_wait,
|
||||||
|
|
Loading…
Reference in a new issue