aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-05-05 19:11:32 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-18 13:23:11 -0400
commitecf854df72847d90d5e44b6676a855677b5a33df (patch)
tree2e59138ddee1c1799042d34baeda8f8f1b5cc981 /drivers/media/video/cx88/cx88-dvb.c
parent8573a9e6a8ed724b7e3074dc8762d4117ed0b3aa (diff)
V4L/DVB (5629): Cx88: VP3054 support can't be a module when cx88 is compiled in
If cx88 support is compiled into the kernel while vp3054 is left as a module, the kernel will fail to link. Adjust the existing "#if" code in cx88 so that it won't consider vp3054 to be supported in this case. It might make sense to move vp3054 selection into the "customisation" menu instead of a cx88 sub-option (though this is a cx88 feature, there is no extra chip involved). It might also make sense to use dvb_attach() to load vp3054 support. Signed-off-by: Trent Piepho <xyzzy@speakeasy.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.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index dbfe4dc9cf8..796083f0091 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -35,9 +35,7 @@
35 35
36#include "mt352.h" 36#include "mt352.h"
37#include "mt352_priv.h" 37#include "mt352_priv.h"
38#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) 38#include "cx88-vp3054-i2c.h"
39# include "cx88-vp3054-i2c.h"
40#endif
41#include "zl10353.h" 39#include "zl10353.h"
42#include "cx22702.h" 40#include "cx22702.h"
43#include "or51132.h" 41#include "or51132.h"
@@ -199,7 +197,7 @@ static struct mt352_config dvico_fusionhdtv_dual = {
199 .demod_init = dvico_dual_demod_init, 197 .demod_init = dvico_dual_demod_init,
200}; 198};
201 199
202#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) 200#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE))
203static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) 201static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe)
204{ 202{
205 static u8 clock_config [] = { 0x89, 0x38, 0x38 }; 203 static u8 clock_config [] = { 0x89, 0x38, 0x38 };
@@ -544,7 +542,7 @@ static int dvb_register(struct cx8802_dev *dev)
544 } 542 }
545 break; 543 break;
546 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: 544 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
547#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) 545#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE))
548 dev->core->pll_addr = 0x61; 546 dev->core->pll_addr = 0x61;
549 dev->core->pll_desc = &dvb_pll_fmd1216me; 547 dev->core->pll_desc = &dvb_pll_fmd1216me;
550 dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config, 548 dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config,
@@ -778,11 +776,10 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
778 if (!(cx88_boards[core->board].mpeg & CX88_MPEG_DVB)) 776 if (!(cx88_boards[core->board].mpeg & CX88_MPEG_DVB))
779 goto fail_core; 777 goto fail_core;
780 778
781#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) 779 /* If vp3054 isn't enabled, a stub will just return 0 */
782 err = vp3054_i2c_probe(dev); 780 err = vp3054_i2c_probe(dev);
783 if (0 != err) 781 if (0 != err)
784 goto fail_core; 782 goto fail_core;
785#endif
786 783
787 /* dvb stuff */ 784 /* dvb stuff */
788 printk("%s/2: cx2388x based dvb card\n", core->name); 785 printk("%s/2: cx2388x based dvb card\n", core->name);
@@ -807,9 +804,7 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv)
807 /* dvb */ 804 /* dvb */
808 videobuf_dvb_unregister(&dev->dvb); 805 videobuf_dvb_unregister(&dev->dvb);
809 806
810#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
811 vp3054_i2c_remove(dev); 807 vp3054_i2c_remove(dev);
812#endif
813 808
814 return 0; 809 return 0;
815} 810}