Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92360
b: refs/heads/master
c: b65aa26
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 66938c8 commit af97f04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 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: 060a5bd764a1d798c20eceeaac5399c672334960
refs/heads/master: b65aa2605683d90966a16abc68112c1fd9e3f3d8
26 changes: 18 additions & 8 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,6 @@ static void tuner_i2c_address_check(struct tuner *t)
tuner_warn("====================== WARNING! ======================\n");
}

static inline void attach_simple_tuner(struct tuner *t)
{
simple_tuner_attach(&t->fe, t->i2c->adapter, t->i2c->addr, t->type);
}

static void attach_tda829x(struct tuner *t)
{
struct tda829x_config cfg = {
Expand Down Expand Up @@ -399,15 +394,25 @@ static void set_type(struct i2c_client *c, unsigned int type,
buffer[2] = 0x86;
buffer[3] = 0x54;
i2c_master_send(c, buffer, 4);
attach_simple_tuner(t);
if (simple_tuner_attach(&t->fe, t->i2c->adapter, t->i2c->addr,
t->type) == NULL) {
t->type = TUNER_ABSENT;
t->mode_mask = T_UNINITIALIZED;
return;
}
break;
case TUNER_PHILIPS_TD1316:
buffer[0] = 0x0b;
buffer[1] = 0xdc;
buffer[2] = 0x86;
buffer[3] = 0xa4;
i2c_master_send(c,buffer,4);
attach_simple_tuner(t);
if (simple_tuner_attach(&t->fe, t->i2c->adapter,
t->i2c->addr, t->type) == NULL) {
t->type = TUNER_ABSENT;
t->mode_mask = T_UNINITIALIZED;
return;
}
break;
case TUNER_XC2028:
{
Expand Down Expand Up @@ -445,7 +450,12 @@ static void set_type(struct i2c_client *c, unsigned int type,
}
break;
default:
attach_simple_tuner(t);
if (simple_tuner_attach(&t->fe, t->i2c->adapter,
t->i2c->addr, t->type) == NULL) {
t->type = TUNER_ABSENT;
t->mode_mask = T_UNINITIALIZED;
return;
}
break;
}

Expand Down

0 comments on commit af97f04

Please sign in to comment.