patch-2.4.0-test12 linux/drivers/sbus/char/aurora.c
Next file: linux/drivers/sbus/char/sab82532.c
Previous file: linux/drivers/sbus/audio/dmy.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Mon Dec 11 12:37:03 2000
- Orig file:
v2.4.0-test11/linux/drivers/sbus/char/aurora.c
- Orig date:
Sun Nov 19 18:44:12 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/sbus/char/aurora.c linux/drivers/sbus/char/aurora.c
@@ -1,4 +1,4 @@
-/* $Id: aurora.c,v 1.9 2000/11/08 05:33:03 davem Exp $
+/* $Id: aurora.c,v 1.10 2000/12/07 04:35:38 anton Exp $
* linux/drivers/sbus/char/aurora.c -- Aurora multiport driver
*
* Copyright (c) 1999 by Oliver Aldulea (oli@bv.ro)
@@ -666,9 +666,11 @@
if (sbus_readb(&bp->r[chip]->r[CD180_MSVR]) & MSVR_CD)
wake_up_interruptible(&port->open_wait);
else if (!((port->flags & ASYNC_CALLOUT_ACTIVE) &&
- (port->flags & ASYNC_CALLOUT_NOHUP)))
- queue_task(&port->tqueue_hangup,
- &tq_scheduler);
+ (port->flags & ASYNC_CALLOUT_NOHUP))) {
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&port->tqueue_hangup) == 0)
+ MOD_DEC_USE_COUNT;
+ }
}
/* We don't have such things yet. My aurora board has DTR and RTS swapped, but that doesn't count in this driver. Let's hope
@@ -2211,13 +2213,13 @@
printk("do_aurora_hangup: start\n");
#endif
tty = port->tty;
- if (tty == NULL)
- return;
-
- tty_hangup(tty);
+ if (tty != NULL) {
+ tty_hangup(tty); /* FIXME: module removal race - AKPM */
#ifdef AURORA_DEBUG
- printk("do_aurora_hangup: end\n");
+ printk("do_aurora_hangup: end\n");
#endif
+ }
+ MOD_DEC_USE_COUNT;
}
static void aurora_hangup(struct tty_struct * tty)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)