V4L/DVB: calibration still successful at 10
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 11 Feb 2009 09:34:11 +0000 (06:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:49 +0000 (12:42 -0300)
With while (i++ < 10) { ... } i can reach 11, so callibration still
succeeds at i == 10.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/tuners/mt2060.c

index 12206d75dd4ee968d96213ebe31f75b55fb14ba5..c7abe3d8f90e1eccdfface5dd7471d3fd0a5fef5 100644 (file)
@@ -278,7 +278,7 @@ static void mt2060_calibrate(struct mt2060_priv *priv)
        while (i++ < 10 && mt2060_readreg(priv, REG_MISC_STAT, &b) == 0 && (b & (1 << 6)) == 0)
                msleep(20);
 
-       if (i < 10) {
+       if (i <= 10) {
                mt2060_readreg(priv, REG_FM_FREQ, &priv->fmfreq); // now find out, what is fmreq used for :)
                dprintk("calibration was successful: %d", (int)priv->fmfreq);
        } else