diff options
Diffstat (limited to 'drivers/media/dvb/frontends/tda1004x.h')
-rw-r--r-- | drivers/media/dvb/frontends/tda1004x.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/tda1004x.h b/drivers/media/dvb/frontends/tda1004x.h index b877b23ed734..e28fca05734c 100644 --- a/drivers/media/dvb/frontends/tda1004x.h +++ b/drivers/media/dvb/frontends/tda1004x.h | |||
@@ -71,12 +71,33 @@ struct tda1004x_config | |||
71 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); | 71 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); |
72 | }; | 72 | }; |
73 | 73 | ||
74 | #if defined(CONFIG_DVB_TDA1004X) || defined(CONFIG_DVB_TDA1004X_MODULE) | ||
74 | extern struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, | 75 | extern struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, |
75 | struct i2c_adapter* i2c); | 76 | struct i2c_adapter* i2c); |
76 | 77 | ||
77 | extern struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config, | 78 | extern struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config, |
78 | struct i2c_adapter* i2c); | 79 | struct i2c_adapter* i2c); |
79 | 80 | #else | |
80 | extern int tda1004x_write_byte(struct dvb_frontend* fe, int reg, int data); | 81 | static inline struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, |
82 | struct i2c_adapter* i2c) | ||
83 | { | ||
84 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); | ||
85 | return NULL; | ||
86 | } | ||
87 | static inline struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config, | ||
88 | struct i2c_adapter* i2c) | ||
89 | { | ||
90 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); | ||
91 | return NULL; | ||
92 | } | ||
93 | #endif // CONFIG_DVB_TDA1004X | ||
94 | |||
95 | static inline int tda1004x_writereg(struct dvb_frontend *fe, u8 reg, u8 val) { | ||
96 | int r = 0; | ||
97 | u8 buf[] = {reg, val}; | ||
98 | if (fe->ops.write) | ||
99 | r = fe->ops.write(fe, buf, 2); | ||
100 | return r; | ||
101 | } | ||
81 | 102 | ||
82 | #endif // TDA1004X_H | 103 | #endif // TDA1004X_H |