Commit 900f734b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] tuner-core: Don't use a static var for xc5000_cfg

A static var is evil, especially if a device has two boards with
xc5000. Instead, just like the other drivers, use stack to store
its config during setup.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 7d275bf8
...@@ -66,7 +66,6 @@ module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); ...@@ -66,7 +66,6 @@ module_param_string(ntsc, ntsc, sizeof(ntsc), 0644);
* Static vars * Static vars
*/ */
static struct xc5000_config xc5000_cfg;
static LIST_HEAD(tuner_list); static LIST_HEAD(tuner_list);
/* /*
...@@ -338,9 +337,12 @@ static void set_type(struct i2c_client *c, unsigned int type, ...@@ -338,9 +337,12 @@ static void set_type(struct i2c_client *c, unsigned int type,
break; break;
case TUNER_XC5000: case TUNER_XC5000:
{ {
xc5000_cfg.i2c_address = t->i2c->addr; struct xc5000_config xc5000_cfg = {
/* if_khz will be set when the digital dvb_attach() occurs */ .i2c_address = t->i2c->addr,
xc5000_cfg.if_khz = 0; /* if_khz will be set at dvb_attach() */
.if_khz = 0,
};
if (!dvb_attach(xc5000_attach, if (!dvb_attach(xc5000_attach,
&t->fe, t->i2c->adapter, &xc5000_cfg)) &t->fe, t->i2c->adapter, &xc5000_cfg))
goto attach_failed; goto attach_failed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment