diff options
author | Holger Waechtler <devnull@localhost> | 2003-06-13 18:30:31 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2003-06-13 18:30:31 +0000 |
commit | c753e6c0e69454b99f32da5e5fd38794418d48c8 (patch) | |
tree | 93cd8958866841fa26725eb16867de35b685fcb9 | |
parent | cfc212de155bbd6e0512244eb0c6a8a9e99416ab (diff) | |
download | mediapointer-dvb-s2-c753e6c0e69454b99f32da5e5fd38794418d48c8.tar.gz mediapointer-dvb-s2-c753e6c0e69454b99f32da5e5fd38794418d48c8.tar.bz2 |
use tq_schedule instead of tq_immediate
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 529ba27b5..d9472a030 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -347,7 +347,7 @@ static void dvb_net_set_multicast_list (struct net_device *dev) { struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; - queue_task(&priv->tq, &tq_immediate); + schedule_task(&priv->tq); } @@ -488,10 +488,22 @@ int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid) static int dvb_net_remove_if(struct dvb_net *dvbnet, int num) { + struct dvb_net_priv *priv = dvbnet->device[num].priv; + unsigned long flags; + if (!dvbnet->state[num]) return -EINVAL; + + /** + * remove tq from task queue if it was scheduled before... + */ + spin_lock_irqsave(&tqueue_lock, flags); + if (test_bit(0, &priv->tq.sync)) + list_del(&priv->tq.list); + spin_unlock_irqrestore(&tqueue_lock, flags); + dvb_net_stop(&dvbnet->device[num]); - kfree(dvbnet->device[num].priv); + kfree(priv); unregister_netdev(&dvbnet->device[num]); dvbnet->state[num]=0; return 0; |