From 0fc55e81d3364e6535cacb10b5a579f8c62625b1 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 9 Jul 2011 12:36:58 -0300 Subject: [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 --- drivers/media/dvb/ddbridge/ddbridge-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/media/dvb/ddbridge') 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; -- cgit v1.2.3