aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-07-09 04:13:22 -0400
committerJaroslav Kysela <perex@suse.cz>2005-07-28 06:22:13 -0400
commitef21ca24faf28df6d06939e77d5032a313490289 (patch)
tree1c6c719f4671b803f1288eb8cdca18587ec2eb62 /sound/pci/rme9652
parent072c01194df6e4843582d09380b780987f642d6d (diff)
[ALSA] sound/pci: fix-up sleeping paths
ENS1370/1+ driver,ES1968 driver,Intel8x0 driver,VIA82xx driver VIA82xx-modem driver,AC97 Codec,ALI5451 driver,CS46xx driver MIXART driver,RME HDSP driver,Trident driver,YMFPCI driver Description: Fix-up sleeping in sound/pci. These changes fall under the following two categories: 1) Replace schedule_timeout() with msleep() to guarantee the task delays as expected. This also involved replacing/removing custom sleep functions. 2) Do not assume jiffies will only increment by one if you request a 1 jiffy sleep, i.e. use time_after/time_before in while loops. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdsp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 0db558a9287..796621de500 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -679,8 +679,7 @@ static int snd_hdsp_load_firmware_from_cache(hdsp_t *hdsp) {
679 } 679 }
680 680
681 if ((1000 / HZ) < 3000) { 681 if ((1000 / HZ) < 3000) {
682 set_current_state(TASK_UNINTERRUPTIBLE); 682 ssleep(3);
683 schedule_timeout((3000 * HZ + 999) / 1000);
684 } else { 683 } else {
685 mdelay(3000); 684 mdelay(3000);
686 } 685 }
@@ -5080,8 +5079,7 @@ static int __devinit snd_hdsp_create(snd_card_t *card,
5080 if (!is_9652 && !is_9632) { 5079 if (!is_9652 && !is_9632) {
5081 /* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */ 5080 /* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */
5082 if ((1000 / HZ) < 2000) { 5081 if ((1000 / HZ) < 2000) {
5083 set_current_state(TASK_UNINTERRUPTIBLE); 5082 ssleep(2);
5084 schedule_timeout((2000 * HZ + 999) / 1000);
5085 } else { 5083 } else {
5086 mdelay(2000); 5084 mdelay(2000);
5087 } 5085 }