From: Andrew de Quincey Date: Tue, 8 Aug 2006 18:48:07 +0000 (-0300) Subject: V4L/DVB (4428): Fix tda826x detection X-Git-Tag: v2.6.19-rc1~643^2~121 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4a49d76ca4e2c0b2b4c89d59d43486d781ffe95;p=linux-2.6 V4L/DVB (4428): Fix tda826x detection 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/tda826x.c b/drivers/media/dvb/frontends/tda826x.c index 7c19b88e95..eeab26bd36 100644 --- a/drivers/media/dvb/frontends/tda826x.c +++ b/drivers/media/dvb/frontends/tda826x.c @@ -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;