summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c14
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-core.c14
2 files changed, 20 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index f2466f715..007130a6c 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -1390,13 +1390,19 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d
/* the Siemens DVB needs this if you want to have the i2c chips
get recognized before the main driver is fully loaded */
saa7146_write(dev, GPIO_CTRL, 0x500000);
+
+ av7110->i2c_adap = (struct i2c_adapter) {
+ .client_register = client_register,
+ .client_unregister = client_unregister,
#ifdef I2C_ADAP_CLASS_TV_DIGITAL
- saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, I2C_ADAP_CLASS_TV_DIGITAL, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
+ .class = I2C_ADAP_CLASS_TV_DIGITAL,
#else
- saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, I2C_CLASS_TV_DIGITAL, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
+ .class = I2C_CLASS_TV_DIGITAL,
#endif
- av7110->i2c_adap.client_register = client_register;
- av7110->i2c_adap.client_unregister = client_unregister;
+ };
+ strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name));
+
+ saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
av7110->i2c_bus = dvb_register_i2c_bus(master_xfer, dev,
av7110->dvb_adapter, 0);
diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c
index d0dfd9990..c37353e19 100644
--- a/linux/drivers/media/dvb/ttpci/budget-core.c
+++ b/linux/drivers/media/dvb/ttpci/budget-core.c
@@ -321,13 +321,19 @@ int ttpci_budget_init (struct budget *budget,
if (bi->type != BUDGET_FS_ACTIVY)
saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */
+ budget->i2c_adap = (struct i2c_adapter) {
+ .client_register = client_register,
+ .client_unregister = client_unregister,
#ifdef I2C_ADAP_CLASS_TV_DIGITAL
- saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, I2C_ADAP_CLASS_TV_DIGITAL, SAA7146_I2C_BUS_BIT_RATE_120);
+ .class = I2C_ADAP_CLASS_TV_DIGITAL,
#else
- saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, I2C_CLASS_TV_DIGITAL, SAA7146_I2C_BUS_BIT_RATE_120);
+ .class = I2C_CLASS_TV_DIGITAL,
#endif
- budget->i2c_adap.client_register = client_register;
- budget->i2c_adap.client_unregister = client_unregister;
+ };
+ strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->card->name));
+
+
+ saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120);
budget->i2c_bus = dvb_register_i2c_bus (master_xfer, dev,
budget->dvb_adapter, 0);