diff options
-rw-r--r-- | linux/drivers/media/dvb/frontends/dvb-pll.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/Kconfig | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/Makefile | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-blackbird.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 29 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | 16 |
6 files changed, 19 insertions, 36 deletions
diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.c b/linux/drivers/media/dvb/frontends/dvb-pll.c index f3d500eb5..0c0b94767 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.c +++ b/linux/drivers/media/dvb/frontends/dvb-pll.c @@ -606,7 +606,6 @@ static int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, // calculate the frequency we set it to return (div * desc->entries[i].stepsize) - desc->iffreq; } -EXPORT_SYMBOL(dvb_pll_configure); static int dvb_pll_release(struct dvb_frontend *fe) { diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig index e88d5d7de..bec790faf 100644 --- a/linux/drivers/media/video/Kconfig +++ b/linux/drivers/media/video/Kconfig @@ -490,7 +490,8 @@ config TUNER_3036 If in doubt, say N. config TUNER_TEA5761 - tristate "TEA 5761 radio tuner (EXPERIMENTAL)" + bool "TEA 5761 radio tuner (EXPERIMENTAL)" + depends on EXPERIMENTAL depends on I2C select VIDEO_TUNER help diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile index 4cddc8cbd..10b4d4469 100644 --- a/linux/drivers/media/video/Makefile +++ b/linux/drivers/media/video/Makefile @@ -7,9 +7,7 @@ zr36067-objs := zoran_procfs.o zoran_device.o \ tuner-objs := tuner-core.o tuner-types.o tuner-simple.o \ mt20xx.o tda8290.o tea5767.o tda9887.o -ifneq ($(CONFIG_TUNER_TEA5761),) - tuner-objs += tea5761.o -endif +tuner-$(CONFIG_TUNER_TEA5761) += tea5761.o msp3400-objs := msp3400-driver.o msp3400-kthreads.o diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index 9103d9567..97e207d56 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -1057,6 +1057,8 @@ static int vidioc_g_tuner (struct file *file, void *priv, if (unlikely(UNSET == core->tuner_type)) return -EINVAL; + if (0 != t->index) + return -EINVAL; strcpy(t->name, "Television"); t->type = V4L2_TUNER_ANALOG_TV; diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 30fd0776a..fedb4c9dd 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -169,7 +169,7 @@ void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg) i2c_clients_command(&core->i2c_adap, cmd, arg); } -static struct i2c_algo_bit_data cx8800_i2c_algo_template = { +static const struct i2c_algo_bit_data cx8800_i2c_algo_template = { .setsda = cx8800_bit_setsda, .setscl = cx8800_bit_setscl, .getsda = cx8800_bit_getsda, @@ -180,20 +180,6 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = { /* ----------------------------------------------------------------------- */ -static struct i2c_adapter cx8800_i2c_adap_template = { - .name = "cx2388x", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - .owner = THIS_MODULE, -#endif - .id = I2C_HW_B_CX2388x, - .client_register = attach_inform, - .client_unregister = detach_inform, -}; - -static struct i2c_client cx8800_i2c_client_template = { - .name = "cx88xx internal", -}; - static char *i2c_devs[128] = { [ 0x1c >> 1 ] = "lgdt330x", [ 0x86 >> 1 ] = "tda9887/cx22702", @@ -223,14 +209,9 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) /* Prevents usage of invalid delay values */ if (i2c_udelay<5) i2c_udelay=5; - cx8800_i2c_algo_template.udelay=i2c_udelay; - memcpy(&core->i2c_adap, &cx8800_i2c_adap_template, - sizeof(core->i2c_adap)); memcpy(&core->i2c_algo, &cx8800_i2c_algo_template, sizeof(core->i2c_algo)); - memcpy(&core->i2c_client, &cx8800_i2c_client_template, - sizeof(core->i2c_client)); #ifdef I2C_CLASS_TV_ANALOG if (core->tuner_type != TUNER_ABSENT) @@ -245,10 +226,18 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) core->i2c_adap.dev.parent = &pci->dev; #endif strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + core->i2c_adap.owner = THIS_MODULE; +#endif + core->i2c_adap.id = I2C_HW_B_CX2388x; + core->i2c_adap.client_register = attach_inform; + core->i2c_adap.client_unregister = detach_inform; + core->i2c_algo.udelay = i2c_udelay; core->i2c_algo.data = core; i2c_set_adapdata(&core->i2c_adap,core); core->i2c_adap.algo_data = &core->i2c_algo; core->i2c_client.adapter = &core->i2c_adap; + strlcpy(core->i2c_client.name, "cx88xx internal", I2C_NAME_SIZE); cx8800_bit_setscl(core,1); cx8800_bit_setsda(core,1); diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index dc97f4686..47b3b3d28 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -98,7 +98,7 @@ static int vp3054_bit_getsda(void *data) /* ----------------------------------------------------------------------- */ -static struct i2c_algo_bit_data vp3054_i2c_algo_template = { +static const struct i2c_algo_bit_data vp3054_i2c_algo_template = { .setsda = vp3054_bit_setsda, .setscl = vp3054_bit_setscl, .getsda = vp3054_bit_getsda, @@ -109,14 +109,6 @@ static struct i2c_algo_bit_data vp3054_i2c_algo_template = { /* ----------------------------------------------------------------------- */ -static struct i2c_adapter vp3054_i2c_adap_template = { - .name = "cx2388x", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - .owner = THIS_MODULE, -#endif - .id = I2C_HW_B_CX2388x, -}; - int vp3054_i2c_probe(struct cx8802_dev *dev) { struct cx88_core *core = dev->core; @@ -131,8 +123,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) return -ENOMEM; vp3054_i2c = dev->card_priv; - memcpy(&vp3054_i2c->adap, &vp3054_i2c_adap_template, - sizeof(vp3054_i2c->adap)); memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template, sizeof(vp3054_i2c->algo)); @@ -145,6 +135,10 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) #endif strlcpy(vp3054_i2c->adap.name, core->name, sizeof(vp3054_i2c->adap.name)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + vp3054_i2c->adap.owner = THIS_MODULE; +#endif + vp3054_i2c->adap.id = I2C_HW_B_CX2388x; vp3054_i2c->algo.data = dev; i2c_set_adapdata(&vp3054_i2c->adap, dev); vp3054_i2c->adap.algo_data = &vp3054_i2c->algo; |