patch-2.4.0-test12 linux/drivers/char/specialix.c
Next file: linux/drivers/char/stallion.c
Previous file: linux/drivers/char/serial167.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Wed Dec 6 12:06:18 2000
- Orig file:
v2.4.0-test11/linux/drivers/char/specialix.c
- Orig date:
Tue Oct 31 12:42:26 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/char/specialix.c linux/drivers/char/specialix.c
@@ -834,8 +834,9 @@
#ifdef SPECIALIX_DEBUG
printk ( "Sending HUP.\n");
#endif
- queue_task(&port->tqueue_hangup,
- &tq_scheduler);
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&port->tqueue_hangup) == 0)
+ MOD_DEC_USE_COUNT;
} else {
#ifdef SPECIALIX_DEBUG
printk ( "Don't need to send HUP.\n");
@@ -2121,10 +2122,9 @@
struct tty_struct *tty;
tty = port->tty;
- if (!tty)
- return;
-
- tty_hangup(tty);
+ if (tty)
+ tty_hangup(tty); /* FIXME: module removal race here */
+ MOD_DEC_USE_COUNT;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)