Skip to content

Commit

Permalink
ALSA: alsa: time reaches -1, tested 0
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Roel Kluin authored and Takashi Iwai committed Jan 31, 2009
1 parent f2257b7 commit 67d8a3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/intel8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 67d8a3c

Please sign in to comment.