Skip to content

Commit

Permalink
V4L/DVB (4428): Fix tda826x detection
Browse files Browse the repository at this point in the history
The tda826x detection was (correctly) cleaned up earlier, but unfortunately
changing the number of received i2c messages from 2 -> 1 was missed. This
fixes it.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Andrew de Quincey authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 17aafcc commit e4a49d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/dvb/frontends/tda826x.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,18 @@ struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2
{
struct tda826x_priv *priv = NULL;
u8 b1 [] = { 0, 0 };
struct i2c_msg msg [] = { { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 } };
struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 };
int ret;

dprintk("%s:\n", __FUNCTION__);

if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
ret = i2c_transfer (i2c, msg, 1);
ret = i2c_transfer (i2c, &msg, 1);
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);

if (ret != 2)
if (ret != 1)
return NULL;
if (!(b1[1] & 0x80))
return NULL;
Expand Down

0 comments on commit e4a49d7

Please sign in to comment.