patch-2.4.0-test12 linux/drivers/isdn/avmb1/b1capi.c

Next file: linux/drivers/isdn/avmb1/b1dma.c
Previous file: linux/drivers/isdn/avmb1/b1.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test11/linux/drivers/isdn/avmb1/b1capi.c linux/drivers/isdn/avmb1/b1capi.c
@@ -468,6 +468,7 @@
 	for (contr=1; VALID_CARD(contr); contr++)
 		 if (test_and_clear_bit(contr, &notify_down_set))
 			 notify_down(contr);
+	MOD_DEC_USE_COUNT;
 }
 
 /* -------- card ready callback ------------------------------- */
@@ -508,7 +509,9 @@
 	}
 
         set_bit(CARDNR(card), &notify_up_set);
-        queue_task(&tq_state_notify, &tq_scheduler);
+	MOD_INC_USE_COUNT;
+        if (schedule_task(&tq_state_notify) == 0)
+		MOD_DEC_USE_COUNT;
 
         flag = ((__u8 *)(profp->manu))[1];
         switch (flag) {
@@ -568,7 +571,9 @@
 		}
 	}
 	set_bit(CARDNR(card), &notify_down_set);
-	queue_task(&tq_state_notify, &tq_scheduler);
+	MOD_INC_USE_COUNT;
+	if (schedule_task(&tq_state_notify) == 0)
+		MOD_DEC_USE_COUNT;
 	printk(KERN_NOTICE "b1capi: card %d down.\n", CARDNR(card));
 }
 

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