From abe7551960927241e089f9b21abc600cd08cbe43 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 14 Oct 2006 11:44:44 -0700 Subject: Fix DBV_FE_CUSTOMISE for card drivers compiled into kernel From: Trent Piepho When a front-end is disabled, card drivers that use it are compiled with a stub version of the front-end's attach function. This way they have no references to the front-end's code and don't need it to be loaded. If a card driver is compiled into the kernel, and a front-end is a module, then that front-end is effectively disabled wrt the card driver. In this case, the card driver should get the stub version. This was not happening. The stub vs real attach function selection is changed so that when the front-end is a module the real attach function is only used if the card driver is a module as well. This means a module front-end will be supported by card drivers that are modules and not supported by card drivers compiled into the kernel. Signed-off-by: Trent Piepho --- linux/drivers/media/dvb/frontends/cx24123.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/cx24123.h') diff --git a/linux/drivers/media/dvb/frontends/cx24123.h b/linux/drivers/media/dvb/frontends/cx24123.h index 57a1dae1d..84f9e4f5c 100644 --- a/linux/drivers/media/dvb/frontends/cx24123.h +++ b/linux/drivers/media/dvb/frontends/cx24123.h @@ -35,7 +35,7 @@ struct cx24123_config int lnb_polarity; }; -#if defined(CONFIG_DVB_CX24123) || defined(CONFIG_DVB_CX24123_MODULE) +#if defined(CONFIG_DVB_CX24123) || (defined(CONFIG_DVB_CX24123_MODULE) && defined(MODULE)) extern struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, struct i2c_adapter* i2c); #else -- cgit v1.2.3