summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/tda10021.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-07-29 15:41:40 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-07-29 15:41:40 -0300
commit9a9f822910db8450c5478fd7146b5b52088d7aaa (patch)
tree9b588f2096c3b7351e4c127a2c8ffbc8b45a6c55 /linux/drivers/media/dvb/frontends/tda10021.h
parent7272f8f51ed77805115b9716b72ab4b6d3db0049 (diff)
parentf7eb6e544385a7d7a594e4bedb982e39a500a838 (diff)
downloadmediapointer-dvb-s2-9a9f822910db8450c5478fd7146b5b52088d7aaa.tar.gz
mediapointer-dvb-s2-9a9f822910db8450c5478fd7146b5b52088d7aaa.tar.bz2
merge: http://linuxtv.org/hg/~quincy/v4l-dvb-attach
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/tda10021.h')
-rw-r--r--linux/drivers/media/dvb/frontends/tda10021.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda10021.h b/linux/drivers/media/dvb/frontends/tda10021.h
index b1df4259b..d68ae20c8 100644
--- a/linux/drivers/media/dvb/frontends/tda10021.h
+++ b/linux/drivers/media/dvb/frontends/tda10021.h
@@ -32,9 +32,24 @@ 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);
-
-extern int tda10021_write_byte(struct dvb_frontend* fe, int reg, int data);
+#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;
+ u8 buf[] = {reg, val};
+ if (fe->ops.write)
+ r = fe->ops.write(fe, buf, 2);
+ return r;
+}
#endif // TDA10021_H