From c10d14d62d7b7596fd5c7bb8aad3f2b56f8640e6 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Tue, 8 Aug 2006 09:10:08 -0300 Subject: V4L/DVB (4384): Remove remaining static function calls Rewrote _write() calls to use write() op. Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/tda10021.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/media/dvb/frontends/tda10021.h') diff --git a/drivers/media/dvb/frontends/tda10021.h b/drivers/media/dvb/frontends/tda10021.h index b1df4259bee..e77df5ed780 100644 --- a/drivers/media/dvb/frontends/tda10021.h +++ b/drivers/media/dvb/frontends/tda10021.h @@ -35,6 +35,12 @@ struct tda10021_config extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, struct i2c_adapter* i2c, u8 pwm); -extern int tda10021_write_byte(struct dvb_frontend* fe, int reg, int data); +static inline int tda10021_writereg(struct dvb_frontend *fe, u8 reg, u8 val) { + int r = 0; + u8 buf[] = {reg, val}; + if (fe->ops.write) + r = fe->ops.write(fe, buf, 2); + return r; +} #endif // TDA10021_H -- cgit v1.2.3 From 102a342bb9672f67a34fd185803aaded4ce8dd0f Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Tue, 8 Aug 2006 09:10:08 -0300 Subject: V4L/DVB (4387): Add Kconfig infrastructure for dvb_attach 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/tda10021.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/media/dvb/frontends/tda10021.h') diff --git a/drivers/media/dvb/frontends/tda10021.h b/drivers/media/dvb/frontends/tda10021.h index e77df5ed780..d68ae20c841 100644 --- a/drivers/media/dvb/frontends/tda10021.h +++ b/drivers/media/dvb/frontends/tda10021.h @@ -32,8 +32,17 @@ struct tda10021_config u8 demod_address; }; +#if defined(CONFIG_DVB_TDA10021) || defined(CONFIG_DVB_TDA10021_MODULE) extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, struct i2c_adapter* i2c, u8 pwm); +#else +static inline struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, + struct i2c_adapter* i2c, u8 pwm) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); + return NULL; +} +#endif // CONFIG_DVB_TDA10021 static inline int tda10021_writereg(struct dvb_frontend *fe, u8 reg, u8 val) { int r = 0; -- cgit v1.2.3