From 77521aea06a577eb5dcad9c975a5801868f478bb Mon Sep 17 00:00:00 2001 From: Holger Waechtler Date: Sun, 29 Jun 2003 21:56:50 +0000 Subject: - remove obsolete fields from struct bt878 - make DMA block pointer volatile - use one local tasklet per card - remove spinlock bt->s_lock, it protected an atomic variable only - remove obsolete waitqueue code, the waitqueue was not used anymore --- linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c') diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index 1d47f90da..71613d39b 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -47,13 +47,10 @@ static void dvb_bt8xx_task(unsigned long data) { struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *)data; - u8 finished_block = card->bt->finished_block; //printk("%d ", finished_block); - while (card->bt->last_block != finished_block) { - - //printk("dvb_bt8xx: missed irq (%d/%d)\n", card->bt->last_block, finished_block); + while (card->bt->last_block != card->bt->finished_block) { dvb_dmx_swfilter(&card->demux, &card->bt->buf_cpu[card->bt->last_block * card->bt->block_bytes], card->bt->block_bytes); @@ -63,7 +60,6 @@ static void dvb_bt8xx_task(unsigned long data) } -static DECLARE_TASKLET_DISABLED(dvb_bt8xx_tasklet, dvb_bt8xx_task, 0); static int dvb_bt8xx_master_xfer(struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num) { @@ -282,8 +278,7 @@ static int __init dvb_bt8xx_load(unsigned int bttv_nr, char *card_name, u32 gpio dvb_net_init(card->adapter, &card->dvbnet, &card->demux.dmx); - dvb_bt8xx_tasklet.data = (long)card; - card->bt->tasklet = &dvb_bt8xx_tasklet; + tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card); bt878_start(card->bt, card->gpio_mode); @@ -307,6 +302,7 @@ static void dvb_bt8xx_close(void) bt878_stop(card->bt); + tasklet_kill(&card->bt->tasklet); dvb_net_release(&card->dvbnet); card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_mem); card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw); -- cgit v1.2.3