diff options
author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2006-08-08 14:48:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 10:53:38 -0400 |
commit | c162dff6437d5f66c272b1811074ee32c53d17b9 (patch) | |
tree | b9bdc3002c5ab742a1ca2fe6e9b9db36cd31d90e /drivers/media/dvb/frontends/dvb-pll.c | |
parent | 174ff219b7e3212f701f70c71860894716b0045b (diff) |
V4L/DVB (4436): Dvb-pll support for MT352/ZL10353 based tuners.
Typical wiring of MT352 and ZL10353 based tuners differs from dvb-pll's
expectation that the PLL is directly accessible. On these boards, the
PLL is actually hidden behind the demodulator, and as such can only be
accessed via the demodulator's interface. It was failing to communicate
with the PLL during an attach test and subsequently not connecting the
tuner ops.
By passing a NULL I2C bus handle to dvb_pll_attach, this accessibility
check can be bypassed. Do this for the affected boards. Also fix a
possible NULL dereference at sleep time, which would otherwise be
exposed by this change.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/dvb-pll.c')
-rw-r--r-- | drivers/media/dvb/frontends/dvb-pll.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index c92877baada2..b7e7108ee5b3 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c | |||
@@ -493,6 +493,9 @@ static int dvb_pll_sleep(struct dvb_frontend *fe) | |||
493 | int i; | 493 | int i; |
494 | int result; | 494 | int result; |
495 | 495 | ||
496 | if (priv->i2c == NULL) | ||
497 | return -EINVAL; | ||
498 | |||
496 | for (i = 0; i < priv->pll_desc->count; i++) { | 499 | for (i = 0; i < priv->pll_desc->count; i++) { |
497 | if (priv->pll_desc->entries[i].limit == 0) | 500 | if (priv->pll_desc->entries[i].limit == 0) |
498 | break; | 501 | break; |