patch-2.4.0-test3 linux/drivers/char/epca.c
Next file: linux/drivers/char/ftape/zftape/zftape-init.c
Previous file: linux/drivers/char/dz.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Wed Jul 5 11:24:41 2000
- Orig file:
v2.4.0-test2/linux/drivers/char/epca.c
- Orig date:
Fri Jun 23 21:55:08 2000
diff -u --recursive --new-file v2.4.0-test2/linux/drivers/char/epca.c linux/drivers/char/epca.c
@@ -127,6 +127,8 @@
-------------------------------------------------------------------------- */
static struct channel *card_ptr[MAXCARDS];
+static struct timer_list epca_timer;
+
/* ---------------------- Begin function prototypes --------------------- */
/* ----------------------------------------------------------------------
@@ -1564,12 +1566,11 @@
struct channel *ch;
unsigned long flags;
+ del_timer_sync(&epca_timer);
save_flags(flags);
cli();
- timer_table[DIGI_TIMER].fn = 0;
-
if ((tty_unregister_driver(&pc_driver)) ||
(tty_unregister_driver(&pc_callout)))
{
@@ -1918,12 +1919,12 @@
Start up the poller to check for events on all enabled boards
---------------------------------------------------------------------- */
- timer_table[DIGI_TIMER].fn = (void *)epcapoll;
- timer_table[DIGI_TIMER].expires = 0;
+ init_timer(&epca_timer);
+ epca_timer.function = epcapoll;
+ mod_timer(&epca_timer, jiffies + HZ/25);
restore_flags(flags);
- timer_active |= 1 << DIGI_TIMER;
return 0;
} /* End pc_init */
@@ -2267,12 +2268,9 @@
} /* End for each card */
- timer_table[DIGI_TIMER].fn = (void *)epcapoll;
- timer_table[DIGI_TIMER].expires = jiffies + (HZ / 25);
- timer_active |= 1 << DIGI_TIMER;
+ mod_timer(&epca_timer, jiffies + (HZ / 25));
restore_flags(flags);
-
} /* End epcapoll */
/* --------------------- Begin doevent ------------------------ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)