Re: [v4l-dvb-maintainer] 2.6.19-rc1: DVB frontend selection causes compile errors

Michael Krufky
2006-10-09T07:53:27Z

Adrian Bunk wrote:
> The DVB frontend selection changes in 2.6.19-rc1 are giving me the
> following compile error:
>
> <-- snip -->
>
> ...
> LD .tmp_vmlinux1
> drivers/built-in.o: In function `dvb_init':
> saa7134-dvb.c:(.text+0x91d94): undefined reference to `tda10086_attach'
> saa7134-dvb.c:(.text+0x91db0): undefined reference to `tda826x_attach'
> make: *** [.tmp_vmlinux1] Error 1
>
> <-- snip -->
>
> .config attached.
>
> cu
> Adrian

Adrian,

Does this fix it for you?

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

diff -r 7efa405e2d66 linux/drivers/media/dvb/frontends/tda10086.h
--- a/drivers/media/dvb/frontends/tda10086.h Fri Oct 06 17:12:00 2006 -0300
+++ b/drivers/media/dvb/frontends/tda10086.h Mon Oct 09 03:43:28 2006 -0400
@@ -35,7 +35,16 @@ struct tda10086_config
u8 invert;
};

+#if defined(CONFIG_DVB_TDA10086) || defined(CONFIG_DVB_TDA10086_MODULE)
extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
struct i2c_adapter* i2c);
+#else
+static inline struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
+ struct i2c_adapter* i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+ return NULL;
+}
+#endif // CONFIG_DVB_TDA10086

#endif // TDA10086_H
diff -r 7efa405e2d66 linux/drivers/media/dvb/frontends/tda826x.h
--- a/drivers/media/dvb/frontends/tda826x.h Fri Oct 06 17:12:00 2006 -0300
+++ b/drivers/media/dvb/frontends/tda826x.h Mon Oct 09 03:43:28 2006 -0400
@@ -35,6 +35,19 @@
* @param has_loopthrough Set to 1 if the card has a loopthrough RF connector.
* @return FE pointer on success, NULL on failure.
*/
-extern struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, int has_loopthrough);
+#if defined(CONFIG_DVB_TDA826X) || defined(CONFIG_DVB_TDA826X_MODULE)
+extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr,
+ struct i2c_adapter *i2c,
+ int has_loopthrough);
+#else
+static inline struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe,
+ int addr,
+ struct i2c_adapter *i2c,
+ int has_loopthrough)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+ return NULL;
+}
+#endif // CONFIG_DVB_TDA826X

-#endif
+#endif // __DVB_TDA826X_H__