* [PATCH] alsa: time reaches -1, tested 0
@ 2009-01-31 11:17 Roel Kluin
2009-01-31 17:09 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-01-31 11:17 UTC (permalink / raw)
To: perex, tiwai; +Cc: lkml
With a postfix decrement time will reach -1 rather than 0,
so the warning will not be issued.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 19d3391..e900cdc 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -617,7 +617,7 @@ static int snd_intel8x0_ali_codec_semaphore(struct intel8x0 *chip)
int time = 100;
if (chip->buggy_semaphore)
return 0; /* just ignore ... */
- while (time-- && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY))
+ while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY))
udelay(1);
if (! time && ! chip->in_ac97_init)
snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n");
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-31 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-31 11:17 [PATCH] alsa: time reaches -1, tested 0 Roel Kluin
2009-01-31 17:09 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox