public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fix build error in drivers/media/video/cx23885/cx23885-dvb.c
@ 2008-05-20 15:32 Ingo Molnar
  2008-05-20 16:16 ` [patch] fix build error in drivers/media/video/cx23885/cx2388 5-dvb.c mkrufky
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-05-20 15:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-kernel, Michael Krufky, Patrick Boettcher, Steven Toth


testing of the -tip tree found the following module build failure on 
latest -git:

    Building modules, stage 2.
    MODPOST 421 modules
    ERROR: "dib7000p_attach" [drivers/media/video/cx23885/cx23885.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

with the following config:

    http://redhat.com/~mingo/misc/config-Tue_May_20_17_13_32_CEST_2008.bad

the problem is caused that ./drivers/media/video/cx23885/cx23885-dvb.c
depends on a DVB_DIB7000P symbol (dib7000p_attach), but its Kconfig rule
only selects it if DVB_FE_CUSTOMISE is enabled:

       select DVB_DIB7000P if !DVB_FE_CUSTOMISE

the minimal fix found is to select the DVB frontend driver unconditionally.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/media/video/cx23885/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/media/video/cx23885/Kconfig
===================================================================
--- linux.orig/drivers/media/video/cx23885/Kconfig
+++ linux/drivers/media/video/cx23885/Kconfig
@@ -11,7 +11,7 @@ config VIDEO_CX23885
 	select VIDEOBUF_DVB
 	select VIDEO_CX25840
 	select VIDEO_CX2341X
-	select DVB_DIB7000P if !DVB_FE_CUSTOMISE
+	select DVB_DIB7000P
 	select MEDIA_TUNER_MT2131 if !DVB_FE_CUSTOMISE
 	select DVB_S5H1409 if !DVB_FE_CUSTOMISE
 	select DVB_LGDT330X if !DVB_FE_CUSTOMISE


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix build error in drivers/media/video/cx23885/cx2388 5-dvb.c
  2008-05-20 15:32 [patch] fix build error in drivers/media/video/cx23885/cx23885-dvb.c Ingo Molnar
@ 2008-05-20 16:16 ` mkrufky
  2008-05-21  6:29   ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: mkrufky @ 2008-05-20 16:16 UTC (permalink / raw)
  To: mingo; +Cc: mchehab, linux-kernel, pb, Stoth, v4l-dvb-maintainer

[-- Attachment #1: Type: text/plain, Size: 1732 bytes --]

Please see below, proper patch attached...

Ingo Molnar wrote:
> testing of the -tip tree found the following module build failure on 
> latest -git:
>
>     Building modules, stage 2.
>     MODPOST 421 modules
>     ERROR: "dib7000p_attach" [drivers/media/video/cx23885/cx23885.ko]
undefined!
>     make[1]: *** [__modpost] Error 1
>     make: *** [modules] Error 2
>
> with the following config:
>
>     http://redhat.com/~mingo/misc/config-Tue_May_20_17_13_32_CEST_2008.bad
>
> the problem is caused that ./drivers/media/video/cx23885/cx23885-dvb.c
> depends on a DVB_DIB7000P symbol (dib7000p_attach), but its Kconfig rule
> only selects it if DVB_FE_CUSTOMISE is enabled:
>
>        select DVB_DIB7000P if !DVB_FE_CUSTOMISE
>
> the minimal fix found is to select the DVB frontend driver
unconditionally.
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  drivers/media/video/cx23885/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/drivers/media/video/cx23885/Kconfig
> ===================================================================
> --- linux.orig/drivers/media/video/cx23885/Kconfig
> +++ linux/drivers/media/video/cx23885/Kconfig
> @@ -11,7 +11,7 @@ config VIDEO_CX23885
>  	select VIDEOBUF_DVB
>  	select VIDEO_CX25840
>  	select VIDEO_CX2341X
> -	select DVB_DIB7000P if !DVB_FE_CUSTOMISE
> +	select DVB_DIB7000P
>  	select MEDIA_TUNER_MT2131 if !DVB_FE_CUSTOMISE
>  	select DVB_S5H1409 if !DVB_FE_CUSTOMISE
>  	select DVB_LGDT330X if !DVB_FE_CUSTOMISE
>
>   

Ingo,

Your patch will work around a symptom of the problem, but this is not 
the proper fix.

Please see the attached patch, which should be applied, instead.

Thanks for pointing this out.

Regards,

Mike Krufky



[-- Attachment #2: dib7000p-attach.patch --]
[-- Type: text/plain, Size: 1346 bytes --]

dib7000p: fix dib7000p_attach when !CONFIG_DVB_DIB7000P

somebody forgot to to fix this header...

Thanks to Ingo Molnar for pointing this out.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>

---
 linux/drivers/media/dvb/frontends/dib7000p.h |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/dib7000p.h
+++ v4l-dvb/linux/drivers/media/dvb/frontends/dib7000p.h
@@ -37,7 +37,20 @@
 
 #define DEFAULT_DIB7000P_I2C_ADDRESS 18
 
-extern struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000p_config *cfg);
+#if defined(CONFIG_DVB_DIB7000P) || (defined(CONFIG_DVB_DIB7000P_MODULE) && defined(MODULE))
+extern struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap,
+					    u8 i2c_addr,
+					    struct dib7000p_config *cfg);
+#else
+static inline struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap,
+						   u8 i2c_addr,
+						   struct dib7000p_config *cfg)
+{
+	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+	return NULL;
+}
+#endif
+
 extern int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[]);
 
 extern struct i2c_adapter * dib7000p_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix build error in drivers/media/video/cx23885/cx2388 5-dvb.c
  2008-05-20 16:16 ` [patch] fix build error in drivers/media/video/cx23885/cx2388 5-dvb.c mkrufky
@ 2008-05-21  6:29   ` Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-05-21  6:29 UTC (permalink / raw)
  To: mkrufky; +Cc: mchehab, linux-kernel, pb, Stoth, v4l-dvb-maintainer


* mkrufky@linuxtv.org <mkrufky@linuxtv.org> wrote:

> Please see below, proper patch attached...

thanks, this too solves the build problem.

Tested-by: Ingo Molnar <mingo@elte.hu>

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-21  6:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 15:32 [patch] fix build error in drivers/media/video/cx23885/cx23885-dvb.c Ingo Molnar
2008-05-20 16:16 ` [patch] fix build error in drivers/media/video/cx23885/cx2388 5-dvb.c mkrufky
2008-05-21  6:29   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox