diff options
author | Gerd Knorr <devnull@localhost> | 2004-10-27 18:34:55 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-10-27 18:34:55 +0000 |
commit | a5991c2b04cd3efd52c94c33db172a102bf0f298 (patch) | |
tree | 51fc94e68ff8fa325829526defe4dc985eaf50c9 /linux/drivers/media | |
parent | 7086c1ee37d2f07aa94d61f22b0a9e2dfb0eee03 (diff) | |
download | mediapointer-dvb-s2-a5991c2b04cd3efd52c94c33db172a102bf0f298.tar.gz mediapointer-dvb-s2-a5991c2b04cd3efd52c94c33db172a102bf0f298.tar.bz2 |
- drop some old, obsolete code.
- misc fixes.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/bttv-cards.c | 40 | ||||
-rw-r--r-- | linux/drivers/media/video/bttv-gpio.c | 9 | ||||
-rw-r--r-- | linux/drivers/media/video/bttv-i2c.c | 28 |
3 files changed, 11 insertions, 66 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c index 14a3be1f4..a1c3ab74a 100644 --- a/linux/drivers/media/video/bttv-cards.c +++ b/linux/drivers/media/video/bttv-cards.c @@ -1,5 +1,5 @@ /* - $Id: bttv-cards.c,v 1.30 2004/10/25 11:26:35 kraxel Exp $ + $Id: bttv-cards.c,v 1.31 2004/10/27 18:34:55 kraxel Exp $ bttv-cards.c @@ -184,7 +184,6 @@ static struct CARD { { 0xd01810fc, BTTV_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" }, { 0x001211bd, BTTV_PINNACLE, "Pinnacle PCTV" }, - { 0x001c11bd, BTTV_PINNACLESAT, "Pinnacle PCTV Sat" }, // some cards ship with byteswapped IDs ... { 0x1200bd11, BTTV_PINNACLE, "Pinnacle PCTV [bswap]" }, { 0xff00bd11, BTTV_PINNACLE, "Pinnacle PCTV [bswap]" }, @@ -307,6 +306,7 @@ static struct CARD { // DVB cards (using pci function .1 for mpeg data xfer) { 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, { 0x07611461, BTTV_AVDVBT_761, "AverMedia AverTV DVB-T" }, + { 0x001c11bd, BTTV_PINNACLESAT, "Pinnacle PCTV Sat" }, { 0x002611bd, BTTV_TWINHAN_DST, "Pinnacle PCTV SAT CI" }, { 0x00011822, BTTV_TWINHAN_DST, "Twinhan VisionPlus DVB-T" }, { 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" }, @@ -1671,6 +1671,7 @@ struct tvcard bttv_tvcards[] = { .needs_tvaudio = 0, .pll = PLL_28, .no_gpioirq = 1, + .has_dvb = 1, },{ .name = "Formac ProTV II (bt878)", .video_inputs = 4, @@ -2968,40 +2969,6 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen) return 0; } -#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE) -/* old 2.4.x way -- via soundcore's mod_firmware_load */ - -static char *firm_altera = "/usr/lib/video4linux/hcwamc.rbf"; -MODULE_PARM(firm_altera,"s"); -MODULE_PARM_DESC(firm_altera,"WinTV/PVR firmware " - "(driver CD => unzip pvr45xxx.exe => hcwamc.rbf)"); - -extern int mod_firmware_load(const char *fn, char **fp); - -int __devinit pvr_boot(struct bttv *btv) -{ - u32 microlen; - u8 *micro; - int result; - - microlen = mod_firmware_load(firm_altera, (char**) µ); - if (!microlen) { - printk(KERN_WARNING "bttv%d: altera firmware not found [%s]\n", - btv->c.nr, firm_altera); - return -1; - } - - printk(KERN_INFO "bttv%d: uploading altera firmware [%s] ...\n", - btv->c.nr, firm_altera); - result = pvr_altera_load(btv, micro, microlen); - printk(KERN_INFO "bttv%d: ... upload %s\n", - btv->c.nr, (result < 0) ? "failed" : "ok"); - vfree(micro); - return result; -} -#else -/* new 2.5.x way -- via hotplug firmware loader */ - int __devinit pvr_boot(struct bttv *btv) { const struct firmware *fw_entry; @@ -3023,7 +2990,6 @@ int __devinit pvr_boot(struct bttv *btv) release_firmware(fw_entry); return rc; } -#endif /* ----------------------------------------------------------------------- */ /* some osprey specific stuff */ diff --git a/linux/drivers/media/video/bttv-gpio.c b/linux/drivers/media/video/bttv-gpio.c index 3f2566675..1f1a66daf 100644 --- a/linux/drivers/media/video/bttv-gpio.c +++ b/linux/drivers/media/video/bttv-gpio.c @@ -1,5 +1,5 @@ /* - $Id: bttv-gpio.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $ + $Id: bttv-gpio.c,v 1.5 2004/10/27 18:34:55 kraxel Exp $ bttv-gpio.c -- gpio sub drivers @@ -63,6 +63,7 @@ static void release_sub_device(struct device *dev) int bttv_sub_add_device(struct bttv_core *core, char *name) { struct bttv_sub_device *sub; + int err; sub = kmalloc(sizeof(*sub),GFP_KERNEL); if (NULL == sub) @@ -76,9 +77,13 @@ int bttv_sub_add_device(struct bttv_core *core, char *name) snprintf(sub->dev.bus_id,sizeof(sub->dev.bus_id),"%s%d", name, core->nr); + err = device_register(&sub->dev); + if (0 != err) { + kfree(sub); + return err; + } printk("bttv%d: add subdevice \"%s\"\n", core->nr, sub->dev.bus_id); list_add_tail(&sub->list,&core->subs); - device_register(&sub->dev); return 0; } diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c index 7ef5f2539..e76b71178 100644 --- a/linux/drivers/media/video/bttv-i2c.c +++ b/linux/drivers/media/video/bttv-i2c.c @@ -1,5 +1,5 @@ /* - $Id: bttv-i2c.c,v 1.11 2004/10/13 10:39:00 kraxel Exp $ + $Id: bttv-i2c.c,v 1.12 2004/10/27 18:34:55 kraxel Exp $ bttv-i2c.c -- all the i2c code is here @@ -37,10 +37,6 @@ static struct i2c_adapter bttv_i2c_adap_sw_template; static struct i2c_adapter bttv_i2c_adap_hw_template; static struct i2c_client bttv_i2c_client_template; -#ifndef I2C_PEC -static void bttv_inc_use(struct i2c_adapter *adap); -static void bttv_dec_use(struct i2c_adapter *adap); -#endif static int attach_inform(struct i2c_client *client); static int detach_inform(struct i2c_client *client); @@ -108,12 +104,7 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = { }; static struct i2c_adapter bttv_i2c_adap_sw_template = { -#ifdef I2C_PEC .owner = THIS_MODULE, -#else - .inc_use = bttv_inc_use, - .dec_use = bttv_dec_use, -#endif #ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, #endif @@ -290,12 +281,7 @@ static struct i2c_algorithm bttv_algo = { }; static struct i2c_adapter bttv_i2c_adap_hw_template = { -#ifdef I2C_PEC .owner = THIS_MODULE, -#else - .inc_use = bttv_inc_use, - .dec_use = bttv_dec_use, -#endif #ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, #endif @@ -309,18 +295,6 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = { /* ----------------------------------------------------------------------- */ /* I2C functions - common stuff */ -#ifndef I2C_PEC -static void bttv_inc_use(struct i2c_adapter *adap) -{ - MOD_INC_USE_COUNT; -} - -static void bttv_dec_use(struct i2c_adapter *adap) -{ - MOD_DEC_USE_COUNT; -} -#endif - static int attach_inform(struct i2c_client *client) { struct bttv *btv = i2c_get_adapdata(client->adapter); |