{
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;
#include <linux/types.h>
#include <linux/i2c.h>
-extern struct dvb_frontend *drxk_attach(struct i2c_adapter *i2c,
- u8 adr,
+struct drxk_config {
+ u8 adr;
+};
+
+extern struct dvb_frontend *drxk_attach(const struct drxk_config *config,
+ struct i2c_adapter *i2c,
struct dvb_frontend **fe_t);
#endif
.read_ucblocks = drxk_read_ucblocks,
};
-struct dvb_frontend *drxk_attach(struct i2c_adapter *i2c, u8 adr,
+struct dvb_frontend *drxk_attach(const struct drxk_config *config,
+ struct i2c_adapter *i2c,
struct dvb_frontend **fe_t)
{
struct drxk_state *state = NULL;
+ u8 adr = config->adr;
dprintk(1, "\n");
state = kzalloc(sizeof(struct drxk_state), GFP_KERNEL);
static int demod_attach_drxk(struct ngene_channel *chan,
struct i2c_adapter *i2c)
{
- chan->fe = dvb_attach(drxk_attach,
- i2c, 0x29 + (chan->number^2),
- &chan->fe2);
+ struct drxk_config config;
+
+ memset(&config, 0, sizeof(config));
+ config.adr = 0x29 + (chan->number ^ 2);
+
+ chan->fe = dvb_attach(drxk_attach, &config, i2c, &chan->fe2);
if (!chan->fe) {
printk(KERN_ERR "No DRXK found!\n");
return -ENODEV;