瀏覽代碼

V4L/DVB (4733): Tda10086: fix frontend selection for dvb_attach

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Michael Krufky 18 年之前
父節點
當前提交
fc13d929cc
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      drivers/media/dvb/frontends/tda10086.h

+ 9 - 0
drivers/media/dvb/frontends/tda10086.h

@@ -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