summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ddbridge
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-09 17:36:58 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 22:55:48 +0200
commit0fc55e81d3364e6535cacb10b5a579f8c62625b1 (patch)
tree28e84110be681bd247568f70a71a406254a54675 /drivers/media/dvb/ddbridge
parent[media] drxk: remove _0 from read/write routines (diff)
downloadlinux-0fc55e81d3364e6535cacb10b5a579f8c62625b1.tar.xz
linux-0fc55e81d3364e6535cacb10b5a579f8c62625b1.zip
[media] drxk: Move I2C address into a config structure
Currently, the only parameter to be configured is the I2C address. However, Terratec H5 logs shows that it needs a different setting for some things, and it has its own firmware. So, move the addr into a config structure, in order to allow adding the required configuration bits. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/ddbridge')
-rw-r--r--drivers/media/dvb/ddbridge/ddbridge-core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c b/drivers/media/dvb/ddbridge/ddbridge-core.c
index def03d482dc0..573d540f213e 100644
--- a/drivers/media/dvb/ddbridge/ddbridge-core.c
+++ b/drivers/media/dvb/ddbridge/ddbridge-core.c
@@ -574,10 +574,12 @@ static int demod_attach_drxk(struct ddb_input *input)
{
struct i2c_adapter *i2c = &input->port->i2c->adap;
struct dvb_frontend *fe;
+ struct drxk_config config;
- fe = input->fe = dvb_attach(drxk_attach,
- i2c, 0x29 + (input->nr&1),
- &input->fe2);
+ memset(&config, 0, sizeof(config));
+ config.adr = 0x29 + (input->nr & 1);
+
+ fe = input->fe = dvb_attach(drxk_attach, &config, i2c, &input->fe2);
if (!input->fe) {
printk(KERN_ERR "No DRXK found!\n");
return -ENODEV;