summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/ddbridge/ddbridge-core.c8
-rw-r--r--drivers/media/dvb/frontends/drxk.h8
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.c4
-rw-r--r--drivers/media/dvb/ngene/ngene-cards.c9
4 files changed, 20 insertions, 9 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;
diff --git a/drivers/media/dvb/frontends/drxk.h b/drivers/media/dvb/frontends/drxk.h
index d1c133e065ff..a7b295f82a86 100644
--- a/drivers/media/dvb/frontends/drxk.h
+++ b/drivers/media/dvb/frontends/drxk.h
@@ -4,7 +4,11 @@
#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
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 8b2e06ea5c08..d351e6a630fc 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -6341,10 +6341,12 @@ static struct dvb_frontend_ops drxk_t_ops = {
.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);
diff --git a/drivers/media/dvb/ngene/ngene-cards.c b/drivers/media/dvb/ngene/ngene-cards.c
index 9f72dd8e9fbd..056419228363 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)
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;