diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-09 11:36:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:55:48 -0400 |
commit | 0fc55e81d3364e6535cacb10b5a579f8c62625b1 (patch) | |
tree | 28e84110be681bd247568f70a71a406254a54675 /drivers/media/dvb/ngene | |
parent | 5e66b87840dd275eafa6b4135b174212dd7c0d75 (diff) |
[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/ngene')
-rw-r--r-- | drivers/media/dvb/ngene/ngene-cards.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/dvb/ngene/ngene-cards.c b/drivers/media/dvb/ngene/ngene-cards.c index 9f72dd8e9fb..05641922836 100644 --- a/drivers/media/dvb/ngene/ngene-cards.c +++ b/drivers/media/dvb/ngene/ngene-cards.c | |||
@@ -213,9 +213,12 @@ static int port_has_drxk(struct i2c_adapter *i2c, int port) | |||
213 | static int demod_attach_drxk(struct ngene_channel *chan, | 213 | static int demod_attach_drxk(struct ngene_channel *chan, |
214 | struct i2c_adapter *i2c) | 214 | struct i2c_adapter *i2c) |
215 | { | 215 | { |
216 | chan->fe = dvb_attach(drxk_attach, | 216 | struct drxk_config config; |
217 | i2c, 0x29 + (chan->number^2), | 217 | |
218 | &chan->fe2); | 218 | memset(&config, 0, sizeof(config)); |
219 | config.adr = 0x29 + (chan->number ^ 2); | ||
220 | |||
221 | chan->fe = dvb_attach(drxk_attach, &config, i2c, &chan->fe2); | ||
219 | if (!chan->fe) { | 222 | if (!chan->fe) { |
220 | printk(KERN_ERR "No DRXK found!\n"); | 223 | printk(KERN_ERR "No DRXK found!\n"); |
221 | return -ENODEV; | 224 | return -ENODEV; |