summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/budget-core.c
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2004-06-21 16:52:14 +0000
committerMichael Hunold <devnull@localhost>2004-06-21 16:52:14 +0000
commit5a55a75489eb0d6a3b1dfdf391f7be6f09036d64 (patch)
treed8be3f2083fb421bf90acb54cc5fb75011eb37da /linux/drivers/media/dvb/ttpci/budget-core.c
parent532af0393d74270b67d5510647d61ed7c59db948 (diff)
downloadmediapointer-dvb-s2-5a55a75489eb0d6a3b1dfdf391f7be6f09036d64.tar.gz
mediapointer-dvb-s2-5a55a75489eb0d6a3b1dfdf391f7be6f09036d64.tar.bz2
- Replace generic saa7146 i2c name by card specific name, suggested by Uli Luckas <luckas@musoft.de>
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/budget-core.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-core.c14
1 files changed, 10 insertions, 4 deletions
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);