V4L/DVB (3861): Convert mt352 to refactored tuner code
authorAndrew de Quincey <adq_dvb@lidskialf.net>
Tue, 18 Apr 2006 20:47:10 +0000 (17:47 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 25 Jun 2006 04:58:47 +0000 (01:58 -0300)
Convert to tuner_ops calls.
Remove pll function pointer from structure.
Use standardised pllbuf function.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/mt352.c
drivers/media/dvb/frontends/mt352.h

index aaaec909ddf830f0372bdf11d19aff43a164852c..a7a347a3cad0ec26ecae4b5c7d030e6f480cce6a 100644 (file)
@@ -286,9 +286,12 @@ static int mt352_set_parameters(struct dvb_frontend* fe,
 
        mt352_calc_nominal_rate(state, op->bandwidth, buf+4);
        mt352_calc_input_freq(state, buf+6);
-       state->config.pll_set(fe, param, buf+8);
 
-       mt352_write(fe, buf, sizeof(buf));
+       if (fe->ops->tuner_ops.pllbuf) {
+               fe->ops->tuner_ops.pllbuf(fe, param, buf+8, 5);
+               buf[8] <<= 1;
+               mt352_write(fe, buf, sizeof(buf));
+       }
        if (state->config.no_tuner) {
                /* start decoding */
                mt352_write(fe, fsm_go, 2);
index 03040cd595bb4b50a0a9cb4d1f4835d663705b02..9e7ff4b8fe5f30156dabb28c4f46408328fe1169 100644 (file)
@@ -49,12 +49,6 @@ 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);
 };
 
 extern struct dvb_frontend* mt352_attach(const struct mt352_config* config,