aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-08-08 14:48:07 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:37 -0400
commite4a49d76ca4e2c0b2b4c89d59d43486d781ffe95 (patch)
tree9700761b6dbaa14c008d5c8d38eaeb6223a7158d /drivers/media/dvb
parent17aafcc67feb359820488ffb0017405ad48b776e (diff)
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 <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/tda826x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/tda826x.c b/drivers/media/dvb/frontends/tda826x.c
index 7c19b88e950f..eeab26bd36ed 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
133{ 133{
134 struct tda826x_priv *priv = NULL; 134 struct tda826x_priv *priv = NULL;
135 u8 b1 [] = { 0, 0 }; 135 u8 b1 [] = { 0, 0 };
136 struct i2c_msg msg [] = { { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 } }; 136 struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 };
137 int ret; 137 int ret;
138 138
139 dprintk("%s:\n", __FUNCTION__); 139 dprintk("%s:\n", __FUNCTION__);
140 140
141 if (fe->ops.i2c_gate_ctrl) 141 if (fe->ops.i2c_gate_ctrl)
142 fe->ops.i2c_gate_ctrl(fe, 1); 142 fe->ops.i2c_gate_ctrl(fe, 1);
143 ret = i2c_transfer (i2c, msg, 1); 143 ret = i2c_transfer (i2c, &msg, 1);
144 if (fe->ops.i2c_gate_ctrl) 144 if (fe->ops.i2c_gate_ctrl)
145 fe->ops.i2c_gate_ctrl(fe, 0); 145 fe->ops.i2c_gate_ctrl(fe, 0);
146 146
147 if (ret != 2) 147 if (ret != 1)
148 return NULL; 148 return NULL;
149 if (!(b1[1] & 0x80)) 149 if (!(b1[1] & 0x80))
150 return NULL; 150 return NULL;