[media] dvb/drxd: stub out drxd_attach when not built
authorArnd Bergmann <arnd@arndb.de>
Thu, 3 May 2012 21:22:26 +0000 (18:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 15 May 2012 10:50:55 +0000 (07:50 -0300)
This avoids getting
drivers/media/video/em28xx/em28xx-dvb.c:721: \
                       undefined reference to `drxd_attach'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/drxd.h

index 34398738f9bcc42fce6352db66966a2557f22b64..216c8c3702f8d6c601246cbf9c9c6773e38a8817 100644 (file)
@@ -51,9 +51,23 @@ struct drxd_config {
         s16(*osc_deviation) (void *priv, s16 dev, int flag);
 };
 
+#if defined(CONFIG_DVB_DRXD) || \
+                       (defined(CONFIG_DVB_DRXD_MODULE) && defined(MODULE))
 extern
 struct dvb_frontend *drxd_attach(const struct drxd_config *config,
                                 void *priv, struct i2c_adapter *i2c,
                                 struct device *dev);
+#else
+static inline
+struct dvb_frontend *drxd_attach(const struct drxd_config *config,
+                                void *priv, struct i2c_adapter *i2c,
+                                struct device *dev)
+{
+       printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
+              __func__);
+       return NULL;
+}
+#endif
+
 extern int drxd_config_i2c(struct dvb_frontend *, int);
 #endif