ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()
[pandora-kernel.git] / sound / soc / au1x / ac97c.c
index 726bd65..d79aa7c 100644 (file)
@@ -91,8 +91,8 @@ static unsigned short au1xac97c_ac97_read(struct snd_ac97 *ac97,
        do {
                mutex_lock(&ctx->lock);
 
-               tmo = 5;
-               while ((RD(ctx, AC97_STATUS) & STAT_CP) && tmo--)
+               tmo = 6;
+               while ((RD(ctx, AC97_STATUS) & STAT_CP) && --tmo)
                        udelay(21);     /* wait an ac97 frame time */
                if (!tmo) {
                        pr_debug("ac97rd timeout #1\n");
@@ -105,7 +105,7 @@ static unsigned short au1xac97c_ac97_read(struct snd_ac97 *ac97,
                 * poll, Forrest, poll...
                 */
                tmo = 0x10000;
-               while ((RD(ctx, AC97_STATUS) & STAT_CP) && tmo--)
+               while ((RD(ctx, AC97_STATUS) & STAT_CP) && --tmo)
                        asm volatile ("nop");
                data = RD(ctx, AC97_CMDRESP);