From: Arnd Bergmann Date: Thu, 3 May 2012 21:22:26 +0000 (-0300) Subject: [media] dvb/drxd: stub out drxd_attach when not built X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=60ab5e12879bd15416c05e6b0460689163581164;p=openwrt%2Fstaging%2Fblogic.git [media] dvb/drxd: stub out drxd_attach when not built This avoids getting drivers/media/video/em28xx/em28xx-dvb.c:721: \ undefined reference to `drxd_attach' Signed-off-by: Arnd Bergmann Signed-off-by: Mathieu Poirier Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/drxd.h b/drivers/media/dvb/frontends/drxd.h index 34398738f9bc..216c8c3702f8 100644 --- a/drivers/media/dvb/frontends/drxd.h +++ b/drivers/media/dvb/frontends/drxd.h @@ -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