提交 80f90fba 编写于 作者: H Hartmut Hackmann 提交者: Mauro Carvalho Chehab

V4L/DVB (5326): Allow to set tuner_config in attach inform

This patch move the assignment of the tuner config and the callback
before the check whether it is called in the attach inform.
This solves a module load order issue
Signed-off-by: NHartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 4217e252
...@@ -160,20 +160,20 @@ static void set_type(struct i2c_client *c, unsigned int type, ...@@ -160,20 +160,20 @@ static void set_type(struct i2c_client *c, unsigned int type,
return; return;
} }
t->type = type;
t->config = new_config;
if (tuner_callback != NULL) {
tuner_dbg("defining GPIO callback\n");
t->tuner_callback = tuner_callback;
}
/* This code detects calls by card attach_inform */ /* This code detects calls by card attach_inform */
if (NULL == t->i2c.dev.driver) { if (NULL == t->i2c.dev.driver) {
tuner_dbg ("tuner 0x%02x: called during i2c_client register by adapter's attach_inform\n", c->addr); tuner_dbg ("tuner 0x%02x: called during i2c_client register by adapter's attach_inform\n", c->addr);
t->type=type;
return; return;
} }
t->type = type;
t->config = new_config;
if (tuner_callback != NULL) {
tuner_dbg("defining GPIO callback\n");
t->tuner_callback = tuner_callback;
}
switch (t->type) { switch (t->type) {
case TUNER_MT2032: case TUNER_MT2032:
microtune_init(c); microtune_init(c);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册