Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=22ee1250bd41534552c61be13994fd12d1ee1318
Commit:     22ee1250bd41534552c61be13994fd12d1ee1318
Parent:     63806eeb61dcdf30fdbf488babff98aea2ca3f08
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 22 17:13:00 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:59 2008 -0200

    V4L/DVB (6678): tda18271: define init callback
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/tda18271.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda18271.c 
b/drivers/media/dvb/frontends/tda18271.c
index aaaa2f8..ad72ff6 100644
--- a/drivers/media/dvb/frontends/tda18271.c
+++ b/drivers/media/dvb/frontends/tda18271.c
@@ -429,17 +429,11 @@ static void tda18271_write_regs(struct dvb_frontend *fe, 
int idx, int len)
 
 /*---------------------------------------------------------------------*/
 
-static void tda18271_init_regs(struct dvb_frontend *fe)
+static int tda18271_init_regs(struct dvb_frontend *fe)
 {
        struct tda18271_priv *priv = fe->tuner_priv;
        unsigned char *regs = priv->tda18271_regs;
 
-       tda18271_read_regs(fe);
-
-       /* test IR_CAL_OK to see if we need init */
-       if ((regs[R_EP1] & 0x08) != 0)
-               return;
-
        printk(KERN_INFO "tda18271: initializing registers\n");
 
        /* initialize registers */
@@ -616,6 +610,8 @@ static void tda18271_init_regs(struct dvb_frontend *fe)
 
        regs[R_EP1] = 0xc6;
        tda18271_write_regs(fe, R_EP1, 1);
+
+       return 0;
 }
 
 static int tda18271_tune(struct dvb_frontend *fe,
@@ -626,10 +622,15 @@ static int tda18271_tune(struct dvb_frontend *fe,
        u32 div, N = 0;
        int i;
 
+       tda18271_read_regs(fe);
+
+       /* test IR_CAL_OK to see if we need init */
+       if ((regs[R_EP1] & 0x08) == 0)
+               tda18271_init_regs(fe);
+
 
        dprintk(1, "freq = %d, ifc = %d\n", freq, ifc);
 
-       tda18271_init_regs(fe);
        /* RF tracking filter calibration */
 
        /* calculate BP_Filter */
@@ -1024,6 +1025,7 @@ static struct dvb_tuner_ops tda18271_tuner_ops = {
                .frequency_max  = 864000000,
                .frequency_step =     62500
        },
+       .init              = tda18271_init_regs,
        .set_params        = tda18271_set_params,
        .set_analog_params = tda18271_set_analog_params,
        .release           = tda18271_release,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to