patch-2.4.0-test12 linux/drivers/char/epca.c

Next file: linux/drivers/char/esp.c
Previous file: linux/drivers/char/drm/mga_drv.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test11/linux/drivers/char/epca.c linux/drivers/char/epca.c
@@ -483,7 +483,9 @@
 	-------------------------------------------------------------------------*/
 
 	ch->event |= 1 << event;
-	queue_task(&ch->tqueue, &tq_scheduler);
+	MOD_INC_USE_COUNT;
+	if (schedule_task(&ch->tqueue) == 0)
+		MOD_DEC_USE_COUNT;
 
 
 } /* End pc_sched_event */
@@ -3435,7 +3437,7 @@
 			if (test_and_clear_bit(EPCA_EVENT_HANGUP, &ch->event)) 
 			{ /* Begin if clear_bit */
 
-				tty_hangup(tty);
+				tty_hangup(tty);	/* FIXME: module removal race here - AKPM */
 				wake_up_interruptible(&ch->open_wait);
 				ch->asyncflags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
 
@@ -3443,7 +3445,7 @@
 		}
 
 	} /* End EPCA_MAGIC */
-
+	MOD_DEC_USE_COUNT;
 } /* End do_softint */
 
 /* ------------------------------------------------------------

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)