]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6852): xc2028: s-code offset should not modify internal control structure
authorChris Pascoe <c.pascoe@itee.uq.edu.au>
Sun, 2 Dec 2007 09:36:42 +0000 (06:36 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:59 +0000 (19:03 -0200)
Don't modify the control structure that was provided at attach when applying
an offset to the S-Code, otherwise it will be incorrect on subsequent tunes.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tuner-xc2028.c

index 416c717eb78e97e6f2f037254bb208033b6dc65b..81cc7f607d4e7d899c381a8a3725e085c5715fa0 100644 (file)
@@ -956,6 +956,7 @@ static int xc2028_set_params(struct dvb_frontend *fe,
        struct xc2028_data *priv = fe->tuner_priv;
        unsigned int       type=0;
        fe_bandwidth_t     bw = BANDWIDTH_8_MHZ;
+       u16                demod = 0;
 
        tuner_dbg("%s called\n", __FUNCTION__);
 
@@ -1009,10 +1010,10 @@ static int xc2028_set_params(struct dvb_frontend *fe,
 
        /* All S-code tables need a 200kHz shift */
        if (priv->ctrl.demod)
-               priv->ctrl.demod += 200;
+               demod = priv->ctrl.demod + 200;
 
        return generic_set_freq(fe, p->frequency,
-                               T_DIGITAL_TV, type, 0, priv->ctrl.demod);
+                               T_DIGITAL_TV, type, 0, demod);
 }
 
 static int xc2028_sleep(struct dvb_frontend *fe)