Skip to content

Commit

Permalink
V4L/DVB (5326): Allow to set tuner_config in attach inform
Browse files Browse the repository at this point in the history
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: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Apr 27, 2007
1 parent 4217e25 commit 80f90fb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,20 @@ static void set_type(struct i2c_client *c, unsigned int type,
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 */
if (NULL == t->i2c.dev.driver) {
tuner_dbg ("tuner 0x%02x: called during i2c_client register by adapter's attach_inform\n", c->addr);

t->type=type;
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) {
case TUNER_MT2032:
microtune_init(c);
Expand Down

0 comments on commit 80f90fb

Please sign in to comment.