diff options
author | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2007-04-27 11:31:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:43:42 -0400 |
commit | 80f90fba3ed8c8826d968125004e4462d2de172e (patch) | |
tree | 8c6437386aafe14d61c2431c9db8c17e3516b198 /drivers/media/video | |
parent | 4217e25275eeb1973ca5bed65645f70b8f6c199d (diff) |
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: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/tuner-core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index b8c38a028841..505591a7abe9 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -160,20 +160,20 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
160 | return; | 160 | return; |
161 | } | 161 | } |
162 | 162 | ||
163 | t->type = type; | ||
164 | t->config = new_config; | ||
165 | if (tuner_callback != NULL) { | ||
166 | tuner_dbg("defining GPIO callback\n"); | ||
167 | t->tuner_callback = tuner_callback; | ||
168 | } | ||
169 | |||
163 | /* This code detects calls by card attach_inform */ | 170 | /* This code detects calls by card attach_inform */ |
164 | if (NULL == t->i2c.dev.driver) { | 171 | if (NULL == t->i2c.dev.driver) { |
165 | tuner_dbg ("tuner 0x%02x: called during i2c_client register by adapter's attach_inform\n", c->addr); | 172 | tuner_dbg ("tuner 0x%02x: called during i2c_client register by adapter's attach_inform\n", c->addr); |
166 | 173 | ||
167 | t->type=type; | ||
168 | return; | 174 | return; |
169 | } | 175 | } |
170 | 176 | ||
171 | t->type = type; | ||
172 | t->config = new_config; | ||
173 | if (tuner_callback != NULL) { | ||
174 | tuner_dbg("defining GPIO callback\n"); | ||
175 | t->tuner_callback = tuner_callback; | ||
176 | } | ||
177 | switch (t->type) { | 177 | switch (t->type) { |
178 | case TUNER_MT2032: | 178 | case TUNER_MT2032: |
179 | microtune_init(c); | 179 | microtune_init(c); |