diff options
Diffstat (limited to 'drivers/char/rio')
-rw-r--r-- | drivers/char/rio/rio_linux.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index e79b2ede8510..85c161845260 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -418,8 +418,7 @@ static void rio_pollfunc(unsigned long data) | |||
418 | func_enter(); | 418 | func_enter(); |
419 | 419 | ||
420 | rio_interrupt(0, &p->RIOHosts[data]); | 420 | rio_interrupt(0, &p->RIOHosts[data]); |
421 | p->RIOHosts[data].timer.expires = jiffies + rio_poll; | 421 | mod_timer(&p->RIOHosts[data].timer, jiffies + rio_poll); |
422 | add_timer(&p->RIOHosts[data].timer); | ||
423 | 422 | ||
424 | func_exit(); | 423 | func_exit(); |
425 | } | 424 | } |
@@ -1154,13 +1153,10 @@ static int __init rio_init(void) | |||
1154 | /* Init the timer "always" to make sure that it can safely be | 1153 | /* Init the timer "always" to make sure that it can safely be |
1155 | deleted when we unload... */ | 1154 | deleted when we unload... */ |
1156 | 1155 | ||
1157 | init_timer(&hp->timer); | 1156 | setup_timer(&hp->timer, rio_pollfunc, i); |
1158 | if (!hp->Ivec) { | 1157 | if (!hp->Ivec) { |
1159 | rio_dprintk(RIO_DEBUG_INIT, "Starting polling at %dj intervals.\n", rio_poll); | 1158 | rio_dprintk(RIO_DEBUG_INIT, "Starting polling at %dj intervals.\n", rio_poll); |
1160 | hp->timer.data = i; | 1159 | mod_timer(&hp->timer, jiffies + rio_poll); |
1161 | hp->timer.function = rio_pollfunc; | ||
1162 | hp->timer.expires = jiffies + rio_poll; | ||
1163 | add_timer(&hp->timer); | ||
1164 | } | 1160 | } |
1165 | } | 1161 | } |
1166 | 1162 | ||
@@ -1191,7 +1187,7 @@ static void __exit rio_exit(void) | |||
1191 | rio_dprintk(RIO_DEBUG_INIT, "freed irq %d.\n", hp->Ivec); | 1187 | rio_dprintk(RIO_DEBUG_INIT, "freed irq %d.\n", hp->Ivec); |
1192 | } | 1188 | } |
1193 | /* It is safe/allowed to del_timer a non-active timer */ | 1189 | /* It is safe/allowed to del_timer a non-active timer */ |
1194 | del_timer(&hp->timer); | 1190 | del_timer_sync(&hp->timer); |
1195 | if (hp->Caddr) | 1191 | if (hp->Caddr) |
1196 | iounmap(hp->Caddr); | 1192 | iounmap(hp->Caddr); |
1197 | if (hp->Type == RIO_PCI) | 1193 | if (hp->Type == RIO_PCI) |