aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authorChris Pascoe <c.pascoe@itee.uq.edu.au>2006-08-08 14:48:08 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:38 -0400
commitc162dff6437d5f66c272b1811074ee32c53d17b9 (patch)
treeb9bdc3002c5ab742a1ca2fe6e9b9db36cd31d90e /drivers/media/video/cx88/cx88-dvb.c
parent174ff219b7e3212f701f70c71860894716b0045b (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/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 81654954c338..b39b3629f1d0 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -543,8 +543,7 @@ static int dvb_register(struct cx8802_dev *dev)
543 &dev->core->i2c_adap); 543 &dev->core->i2c_adap);
544 if (dev->dvb.frontend != NULL) { 544 if (dev->dvb.frontend != NULL) {
545 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, 545 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
546 &dev->core->i2c_adap, 546 NULL, &dvb_pll_thomson_dtt7579);
547 &dvb_pll_thomson_dtt7579);
548 break; 547 break;
549 } 548 }
550 /* ZL10353 replaces MT352 on later cards */ 549 /* ZL10353 replaces MT352 on later cards */
@@ -552,8 +551,7 @@ static int dvb_register(struct cx8802_dev *dev)
552 &dev->core->i2c_adap); 551 &dev->core->i2c_adap);
553 if (dev->dvb.frontend != NULL) { 552 if (dev->dvb.frontend != NULL) {
554 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, 553 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
555 &dev->core->i2c_adap, 554 NULL, &dvb_pll_thomson_dtt7579);
556 &dvb_pll_thomson_dtt7579);
557 } 555 }
558 break; 556 break;
559 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: 557 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
@@ -563,8 +561,7 @@ static int dvb_register(struct cx8802_dev *dev)
563 &dev->core->i2c_adap); 561 &dev->core->i2c_adap);
564 if (dev->dvb.frontend != NULL) { 562 if (dev->dvb.frontend != NULL) {
565 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 563 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
566 &dev->core->i2c_adap, 564 NULL, &dvb_pll_thomson_dtt7579);
567 &dvb_pll_thomson_dtt7579);
568 break; 565 break;
569 } 566 }
570 /* ZL10353 replaces MT352 on later cards */ 567 /* ZL10353 replaces MT352 on later cards */
@@ -572,8 +569,7 @@ static int dvb_register(struct cx8802_dev *dev)
572 &dev->core->i2c_adap); 569 &dev->core->i2c_adap);
573 if (dev->dvb.frontend != NULL) { 570 if (dev->dvb.frontend != NULL) {
574 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 571 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
575 &dev->core->i2c_adap, 572 NULL, &dvb_pll_thomson_dtt7579);
576 &dvb_pll_thomson_dtt7579);
577 } 573 }
578 break; 574 break;
579 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: 575 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
@@ -581,8 +577,7 @@ static int dvb_register(struct cx8802_dev *dev)
581 &dev->core->i2c_adap); 577 &dev->core->i2c_adap);
582 if (dev->dvb.frontend != NULL) { 578 if (dev->dvb.frontend != NULL) {
583 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 579 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
584 &dev->core->i2c_adap, 580 NULL, &dvb_pll_lg_z201);
585 &dvb_pll_lg_z201);
586 } 581 }
587 break; 582 break;
588 case CX88_BOARD_KWORLD_DVB_T: 583 case CX88_BOARD_KWORLD_DVB_T:
@@ -592,8 +587,7 @@ static int dvb_register(struct cx8802_dev *dev)
592 &dev->core->i2c_adap); 587 &dev->core->i2c_adap);
593 if (dev->dvb.frontend != NULL) { 588 if (dev->dvb.frontend != NULL) {
594 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 589 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
595 &dev->core->i2c_adap, 590 NULL, &dvb_pll_unknown_1);
596 &dvb_pll_unknown_1);
597 } 591 }
598 break; 592 break;
599 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: 593 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: