From 60ab5e12879bd15416c05e6b0460689163581164 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 3 May 2012 18:22:26 -0300 Subject: [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 --- drivers/media/dvb/frontends/drxd.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers/media/dvb') diff --git a/drivers/media/dvb/frontends/drxd.h b/drivers/media/dvb/frontends/drxd.h index 34398738f9b..216c8c3702f 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 -- cgit v1.2.3-70-g09d2