From 830851182365a2c7ecd43f52d45ad5afe98f73c1 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Fri, 28 Jul 2006 23:10:14 +0100 Subject: Remove remaining static function calls From: Andrew de Quincey Rewrote _write() calls to use write() op. Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho --- linux/drivers/media/dvb/frontends/mt352.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/mt352.h') diff --git a/linux/drivers/media/dvb/frontends/mt352.h b/linux/drivers/media/dvb/frontends/mt352.h index 9e7ff4b8f..0de2057f9 100644 --- a/linux/drivers/media/dvb/frontends/mt352.h +++ b/linux/drivers/media/dvb/frontends/mt352.h @@ -54,6 +54,11 @@ struct mt352_config extern struct dvb_frontend* mt352_attach(const struct mt352_config* config, struct i2c_adapter* i2c); -extern int mt352_write(struct dvb_frontend* fe, u8* ibuf, int ilen); +static inline int mt352_write(struct dvb_frontend *fe, u8 *buf, int len) { + int r = 0; + if (fe->ops.write) + r = fe->ops.write(fe, buf, len); + return r; +} #endif // MT352_H -- cgit v1.2.3 From ab936b443d684bd023ba22857d6b4b58c22c0db7 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Fri, 28 Jul 2006 23:10:25 +0100 Subject: Add Kconfig infrastructure for dvb_attach From: Andrew de Quincey Allow it to be en/disabled Disable it in < 2.6.17 due to symbol_xxx() bug Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho --- linux/drivers/media/dvb/frontends/mt352.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'linux/drivers/media/dvb/frontends/mt352.h') diff --git a/linux/drivers/media/dvb/frontends/mt352.h b/linux/drivers/media/dvb/frontends/mt352.h index 0de2057f9..0035c2e2d 100644 --- a/linux/drivers/media/dvb/frontends/mt352.h +++ b/linux/drivers/media/dvb/frontends/mt352.h @@ -51,8 +51,17 @@ struct mt352_config int (*demod_init)(struct dvb_frontend* fe); }; +#if defined(CONFIG_DVB_MT352) || defined(CONFIG_DVB_MT352_MODULE) extern struct dvb_frontend* mt352_attach(const struct mt352_config* config, struct i2c_adapter* i2c); +#else +static inline struct dvb_frontend* mt352_attach(const struct mt352_config* config, + struct i2c_adapter* i2c) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); + return NULL; +} +#endif // CONFIG_DVB_MT352 static inline int mt352_write(struct dvb_frontend *fe, u8 *buf, int len) { int r = 0; -- cgit v1.2.3