Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98485
b: refs/heads/master
c: bc36ec7
h: refs/heads/master
i:
  98483: 492fc66
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jun 26, 2008
1 parent dfaa4f1 commit e2ca290
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 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: b25fed115a8bd8d39d14ce0d03e808272a401d67
refs/heads/master: bc36ec746409e4e4719b94a86dc0d8cbeb6f439f
18 changes: 14 additions & 4 deletions trunk/drivers/media/dvb/frontends/tda1004x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,19 +1248,24 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
struct i2c_adapter* i2c)
{
struct tda1004x_state *state;
u8 id;

/* allocate memory for the internal state */
state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL);
if (!state)
if (!state) {
printk(KERN_ERR "Can't alocate memory for tda10045 state\n");
return NULL;
}

/* setup the state */
state->config = config;
state->i2c = i2c;
state->demod_type = TDA1004X_DEMOD_TDA10045;

/* check if the demod is there */
if (tda1004x_read_byte(state, TDA1004X_CHIPID) != 0x25) {
id = tda1004x_read_byte(state, TDA1004X_CHIPID);
if (id != 0x25) {
printk(KERN_ERR "Invalid tda1004x ID = 0x%02x. Can't proceed\n", id);
kfree(state);
return NULL;
}
Expand Down Expand Up @@ -1307,19 +1312,24 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
struct i2c_adapter* i2c)
{
struct tda1004x_state *state;
u8 id;

/* allocate memory for the internal state */
state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL);
if (!state)
if (!state) {
printk(KERN_ERR "Can't alocate memory for tda10046 state\n");
return NULL;
}

/* setup the state */
state->config = config;
state->i2c = i2c;
state->demod_type = TDA1004X_DEMOD_TDA10046;

/* check if the demod is there */
if (tda1004x_read_byte(state, TDA1004X_CHIPID) != 0x46) {
id = tda1004x_read_byte(state, TDA1004X_CHIPID);
if (id != 0x46) {
printk(KERN_ERR "Invalid tda1004x ID = 0x%02x. Can't proceed\n", id);
kfree(state);
return NULL;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,8 @@ static int dvb_init(struct saa7134_dev *dev)
ads_tech_duo_config.tuner_address);
goto dettach_frontend;
}
}
} else
wprintk("failed to attach tda10046\n");
break;
case SAA7134_BOARD_TEVION_DVBT_220RF:
if (configure_tda827x_fe(dev, &tevion_dvbt220rf_config,
Expand Down

0 comments on commit e2ca290

Please sign in to comment.