aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-10-24 09:02:37 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:19:49 -0500
commit8433a509c0eb6bb1f33ce39c82c580b8901619ee (patch)
treef1554905dee5da4e840dfd674d5b004124496a22 /sound/pci/via82xx.c
parentd78bec210f07b06f406b877b9179e0cc281ae8e6 (diff)
[ALSA] Fix schedule_timeout usage
Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use human-time conversion functions instead of hard-coded division to avoid rounding issues. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r--sound/pci/via82xx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 9b2bea866d1b..523eace250f7 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2027,8 +2027,7 @@ static int snd_via82xx_chip_init(via82xx_t *chip)
2027 pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval); 2027 pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
2028 if (pval & VIA_ACLINK_C00_READY) /* primary codec ready */ 2028 if (pval & VIA_ACLINK_C00_READY) /* primary codec ready */
2029 break; 2029 break;
2030 set_current_state(TASK_UNINTERRUPTIBLE); 2030 schedule_timeout_uninterruptible(1);
2031 schedule_timeout(1);
2032 } while (time_before(jiffies, end_time)); 2031 } while (time_before(jiffies, end_time));
2033 2032
2034 if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY) 2033 if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
@@ -2047,8 +2046,7 @@ static int snd_via82xx_chip_init(via82xx_t *chip)
2047 chip->ac97_secondary = 1; 2046 chip->ac97_secondary = 1;
2048 goto __ac97_ok2; 2047 goto __ac97_ok2;
2049 } 2048 }
2050 set_current_state(TASK_INTERRUPTIBLE); 2049 schedule_timeout_interruptible(1);
2051 schedule_timeout(1);
2052 } while (time_before(jiffies, end_time)); 2050 } while (time_before(jiffies, end_time));
2053 /* This is ok, the most of motherboards have only one codec */ 2051 /* This is ok, the most of motherboards have only one codec */
2054 2052