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

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

index d7d9f59d76d2be53de299ad63f6e2d85caa43520..73fe40b50fc4eb78baa1b06a027a7440ea2175f3 100644 (file)
@@ -125,7 +125,6 @@ static int zl10353_sleep(struct dvb_frontend *fe)
 static int zl10353_set_parameters(struct dvb_frontend *fe,
                                  struct dvb_frontend_parameters *param)
 {
-       struct zl10353_state *state = fe->demodulator_priv;
        u8 pllbuf[6] = { 0x67 };
 
        /* These settings set "auto-everything" and start the FSM. */
@@ -142,8 +141,11 @@ static int zl10353_set_parameters(struct dvb_frontend *fe,
        zl10353_single_write(fe, 0x66, 0xE9);
        zl10353_single_write(fe, 0x62, 0x0A);
 
-       state->config.pll_set(fe, param, pllbuf + 1);
-       zl10353_write(fe, pllbuf, sizeof(pllbuf));
+       if (fe->ops->tuner_ops.pllbuf) {
+               fe->ops->tuner_ops.pllbuf(fe, param, pllbuf+1, 5);
+               pllbuf[1] <<= 1;
+               zl10353_write(fe, pllbuf, sizeof(pllbuf));
+       }
 
        zl10353_single_write(fe, 0x70, 0x01);
        udelay(250);
index 5cc4ae718d8c2a68e98b5b6dc9b545115ddfb479..63c36ec02adfdab0f62ef0e5d4dbe61c0bcac0af 100644 (file)
@@ -28,11 +28,6 @@ struct zl10353_config
 {
        /* demodulator's I2C address */
        u8 demod_address;
-
-       /* function which configures the PLL buffer (for secondary I2C
-        * connected tuner) or tunes the PLL (for direct connected tuner) */
-       int (*pll_set)(struct dvb_frontend *fe,
-                      struct dvb_frontend_parameters *params, u8 *pllbuf);
 };
 
 extern struct dvb_frontend* zl10353_attach(const struct zl10353_config *config,