Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76344
b: refs/heads/master
c: 48aa336
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 05bca91 commit 20bccb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 690c544cf849e627d3f40a71633d0caf5c33eafe
refs/heads/master: 48aa336a842ad3bd4f031f14fb6d06b0274c38f9
13 changes: 11 additions & 2 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
t->tuner_callback = tuner_callback;
}

/* This code detects calls by card attach_inform */
if (NULL == t->i2c.dev.driver) {
if (t->mode == T_UNINITIALIZED) {
tuner_dbg ("tuner 0x%02x: called during i2c_client register by adapter's attach_inform\n", c->addr);

return;
Expand Down Expand Up @@ -684,6 +683,16 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
/* Should be just before return */
register_client:
tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name);

/* Sets a default mode */
if (t->mode_mask & T_ANALOG_TV) {
t->mode = T_ANALOG_TV;
} else if (t->mode_mask & T_RADIO) {
t->mode = T_RADIO;
} else {
t->mode = T_DIGITAL_TV;
}

i2c_attach_client (client);
set_type (client,t->type, t->mode_mask, t->config, t->tuner_callback);
return 0;
Expand Down

0 comments on commit 20bccb0

Please sign in to comment.