Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[sfrench/cifs-2.6.git] / drivers / media / dvb / frontends / mt352.h
index 03040cd595bb4b50a0a9cb4d1f4835d663705b02..595092f9f0c4a7caf1a73f5b623d21234c33eca1 100644 (file)
@@ -49,17 +49,25 @@ struct mt352_config
 
        /* Initialise the demodulator and PLL. Cannot be NULL */
        int (*demod_init)(struct dvb_frontend* fe);
-
-       /* PLL setup - fill out the supplied 5 byte buffer with your PLL settings.
-        * byte0: Set to pll i2c address (nonlinux; left shifted by 1)
-        * byte1-4: PLL configuration.
-        */
-       int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf);
 };
 
+#if defined(CONFIG_DVB_MT352) || (defined(CONFIG_DVB_MT352_MODULE) && defined(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", __func__);
+       return NULL;
+}
+#endif // CONFIG_DVB_MT352
 
-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