diff options
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index 6eed67fc6..c0e037a84 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -225,7 +225,7 @@ static int dvb_bt8xx_start_feed(struct dvb_demux_feed *dvbdmxfeed) card->active = 1; - bt878_start(&bt878[0], (0 << 26) | (0 << 15) | (1 << 14) | (0 << 6) | (1 << 5)); + bt878_start(&bt878[0], card->gpio_mode); return 0; @@ -246,22 +246,26 @@ static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed) return 0; bt878_stop(&bt878[0]); + card->active = 0; return 0; } -static int __init dvb_bt8xx_load(unsigned int bttv_nr) +static int __init dvb_bt8xx_load(unsigned int bttv_nr, char *card_name, u32 gpio_mode) { struct dvb_bt8xx_card *card; int result; - + + dprintk("dvb_bt8xx: identified card%d as Nebula DigiTV DVB-T card\n", bttv_nr); + if (!(card = kmalloc(sizeof(struct dvb_bt8xx_card), GFP_KERNEL))) return -ENOMEM; card->bttv_nr = bttv_nr; + card->gpio_mode = gpio_mode; if (!(card->i2c_adap = bttv_get_i2c_adap(card->bttv_nr))) { @@ -273,7 +277,7 @@ static int __init dvb_bt8xx_load(unsigned int bttv_nr) } - if ((result = dvb_register_adapter(&card->adapter, "Bt8xx based DVB adapter")) < 0) { + if ((result = dvb_register_adapter(&card->adapter, card_name)) < 0) { printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result); @@ -297,7 +301,7 @@ static int __init dvb_bt8xx_load(unsigned int bttv_nr) memset(&card->demux, 0, sizeof(struct dvb_demux)); - card->demux.dmx.vendor = "Connexant"; + card->demux.dmx.vendor = card_name; card->demux.dmx.model = "Software"; card->demux.dmx.id = "demux0_0"; card->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING | DMX_MEMORY_BASED_FILTERING; @@ -440,9 +444,7 @@ static int __init dvb_bt8xx_init(void) if (card_id == 0x01010071) { - dprintk("dvb_bt8xx: identified card%d as Nebula DigiTV DVB-T card\n", card_nr); - - if ((result = dvb_bt8xx_load(card_nr)) < 0) { + if ((result = dvb_bt8xx_load(card_nr, "Nebula DigiTV DVB-T", (1 << 26) | (1 << 14) | (1 << 5))) < 0) { dvb_bt8xx_close(); |