Skip to contentSkip to conversation

V4L/DVB: calibration still successful at 10

PATCH New Roel Kluin 1 participant 1 message Feb 11, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 V4L/DVB: calibration still successful at 10

With while (i++ < 10) { ... } i can reach 11, so callibration still succeeds at i == 10.

---

drivers/media/common/tuners/mt2060.c +1 -1
index 12206d7..c7abe3d 100644
@@ -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