patch-2.4.0-test12 linux/drivers/net/wan/sdlamain.c
Next file: linux/drivers/net/wan/x25_asy.h
Previous file: linux/drivers/net/wan/comx.h
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Mon Dec 11 13:01:55 2000
- Orig file:
v2.4.0-test11/linux/drivers/net/wan/sdlamain.c
- Orig date:
Tue Oct 31 12:42:26 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/net/wan/sdlamain.c linux/drivers/net/wan/sdlamain.c
@@ -106,14 +106,7 @@
static sdla_t* card_array; /* adapter data space */
/* Task queue element for creating a 'thread' */
-static struct tq_struct sdla_tq =
-{
- NULL, /* .next */
- 0, /* .sync */
- &sdla_poll, /* .routine */
- NULL /* .data */
-};
-
+static struct tq_struct sdla_tq = { routine: sdla_poll };
/******* Kernel Loadable Module Entry Points ********************************/
@@ -480,8 +473,11 @@
if(card->hw.type != SDLA_S514 && !card->wandev.piggyback)
request_region(card->hw.port, card->hw.io_range, wandev->name);
- if (++active == 1)
- queue_task(&sdla_tq, &tq_scheduler);
+ if (++active == 1) {
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&sdla_tq) == 0)
+ MOD_DEC_USE_COUNT;
+ }
wandev->critical = 0;
return 0;
@@ -859,8 +855,12 @@
card->poll(card);
}
}
- if (active)
- queue_task(&sdla_tq, &tq_scheduler);
+ if (active) {
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&sdla_tq) == 0) /* Surely not? */
+ MOD_DEC_USE_COUNT;
+ }
+ 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)