summaryrefslogtreecommitdiff
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 02:38:55 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:28:58 -0800
commit34b55b865ed12494e23b09b5d2e8da22047fd6a7 (patch)
tree9da544c0201eb27bb12900c943211a9e530cb59e /drivers/char/isicom.c
parent906cdecbedae93e3f63651000f620acddf4debe9 (diff)
[PATCH] Char: isicom, simplify timer
Don't init timer in such complicated way. Use DEFINE_TIMER and then only mod_timer to reset the expiration. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r--drivers/char/isicom.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 734fe39a6ac2..adab41cdab65 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -173,12 +173,13 @@ static int prev_card = 3; /* start servicing isi_card[0] */
static struct tty_driver *isicom_normal;
static DECLARE_COMPLETION(isi_timerdone);
-static struct timer_list tx;
static char re_schedule = 1;
static void isicom_tx(unsigned long _data);
static void isicom_start(struct tty_struct *tty);
+static DEFINE_TIMER(tx, isicom_tx, 0, 0);
+
/* baud index mappings from linux defns to isi */
static signed char linuxb_to_isib[] = {
@@ -519,13 +520,7 @@ sched_again:
return;
}
- init_timer(&tx);
- tx.expires = jiffies + HZ/100;
- tx.data = 0;
- tx.function = isicom_tx;
- add_timer(&tx);
-
- return;
+ mod_timer(&tx, jiffies + msecs_to_jiffies(10));
}
/* Interrupt handlers */
@@ -1907,12 +1902,7 @@ static int __init isicom_init(void)
goto err_unrtty;
}
- init_timer(&tx);
- tx.expires = jiffies + 1;
- tx.data = 0;
- tx.function = isicom_tx;
- re_schedule = 1;
- add_timer(&tx);
+ mod_timer(&tx, jiffies + 1);
return 0;
err_unrtty: