]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (5976): mt2131 s5h1409: correct frontend selection logic
authorTrent Piepho <xyzzy@speakeasy.org>
Tue, 31 Jul 2007 21:51:30 +0000 (18:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:04:33 +0000 (22:04 -0300)
If a card driver is compiled into the kernel and mt2131 or s5h1409 are
compiled as modules, the kernel won't link.

A compiled in driver can't use a module, so in this case the mt2131 or s5h1409
are effectively disabled w.r.t the compiled in driver and the stub attach
function should be used.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/mt2131.h
drivers/media/dvb/frontends/s5h1409.h

index 608f1f66c9e718ea03481ca1a42709d1d4fae9eb..1e4ffe7dc8c89ead1f5c5c1b529bf6f7b6549510 100644 (file)
@@ -30,7 +30,7 @@ struct mt2131_config {
        u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */
 };
 
-#if defined(CONFIG_DVB_TUNER_MT2131) || defined(CONFIG_DVB_TUNER_MT2131_MODULE)
+#if defined(CONFIG_DVB_TUNER_MT2131) || (defined(CONFIG_DVB_TUNER_MT2131_MODULE) && defined(MODULE))
 extern struct dvb_frontend* mt2131_attach(struct dvb_frontend *fe,
                                          struct i2c_adapter *i2c,
                                          struct mt2131_config *cfg,
index bccfd8a6fbd44e889826bdb94bbf1508a22674af..20f9af1af445c2f49304ab6979aa28e7c5eb7894 100644 (file)
@@ -53,7 +53,7 @@ struct s5h1409_config
        u8 status_mode;
 };
 
-#if defined(CONFIG_DVB_S5H1409) || defined(CONFIG_DVB_S5H1409_MODULE)
+#if defined(CONFIG_DVB_S5H1409) || (defined(CONFIG_DVB_S5H1409_MODULE) && defined(MODULE))
 extern struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config,
                                           struct i2c_adapter* i2c);
 #else