Commit 8423f1fe authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] remove interruptible_sleep_on_timeout() usage

GUS Library
Replace deprecated interruptible_sleep_on_timeout() with
wait_event_timeout(). Code is not identical, as the current sleeping
system is 1 jiffy at a time checking atomic_read()'s return every
iteration. Patch is compile-tested.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent aa426f3d
......@@ -697,16 +697,10 @@ static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream)
snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime;
gus_pcm_private_t *pcmp = runtime->private_data;
unsigned long jiffies_old;
jiffies_old = jiffies;
while (atomic_read(&pcmp->dma_count) > 0) {
interruptible_sleep_on_timeout(&pcmp->sleep, 1);
if ((signed long)(jiffies - jiffies_old) > 2*HZ) {
snd_printk("gf1 pcm - serious DMA problem\n");
break;
}
}
if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ))
snd_printk("gf1 pcm - serious DMA problem\n");
snd_gf1_dma_done(gus);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment