aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/intel8x0m.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 04:37:40 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:16:59 -0500
commit954bea35571461b083390a82b03f077f901fe678 (patch)
tree5fb17a9692886a133a943e1961af81a32df4886f /sound/pci/intel8x0m.c
parentc9a49bb1957f45e0146c17a865f1444fd06c0f97 (diff)
[ALSA] intel8x0 - Clean up delay function
Modules: Intel8x0 driver,Intel8x0-modem driver Remove superfluous delay macro. Call appropriate functions directly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/intel8x0m.c')
-rw-r--r--sound/pci/intel8x0m.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index a42091860da7..3244df9c1e92 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -889,10 +889,6 @@ static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock)
889 * 889 *
890 */ 890 */
891 891
892#define do_delay(chip) do {\
893 schedule_timeout_uninterruptible(1);\
894} while (0)
895
896static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing) 892static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing)
897{ 893{
898 unsigned long end_time; 894 unsigned long end_time;
@@ -914,7 +910,7 @@ static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing)
914 do { 910 do {
915 if ((igetdword(chip, ICHREG(GLOB_CNT)) & ICH_AC97WARM) == 0) 911 if ((igetdword(chip, ICHREG(GLOB_CNT)) & ICH_AC97WARM) == 0)
916 goto __ok; 912 goto __ok;
917 do_delay(chip); 913 schedule_timeout_uninterruptible(1);
918 } while (time_after_eq(end_time, jiffies)); 914 } while (time_after_eq(end_time, jiffies));
919 snd_printk(KERN_ERR "AC'97 warm reset still in progress? [0x%x]\n", igetdword(chip, ICHREG(GLOB_CNT))); 915 snd_printk(KERN_ERR "AC'97 warm reset still in progress? [0x%x]\n", igetdword(chip, ICHREG(GLOB_CNT)));
920 return -EIO; 916 return -EIO;
@@ -930,7 +926,7 @@ static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing)
930 status = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR); 926 status = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR);
931 if (status) 927 if (status)
932 break; 928 break;
933 do_delay(chip); 929 schedule_timeout_uninterruptible(1);
934 } while (time_after_eq(end_time, jiffies)); 930 } while (time_after_eq(end_time, jiffies));
935 if (! status) { 931 if (! status) {
936 /* no codec is found */ 932 /* no codec is found */
@@ -944,7 +940,7 @@ static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing)
944 /* wait for other codecs ready status. */ 940 /* wait for other codecs ready status. */
945 end_time = jiffies + HZ / 4; 941 end_time = jiffies + HZ / 4;
946 while (status != nstatus && time_after_eq(end_time, jiffies)) { 942 while (status != nstatus && time_after_eq(end_time, jiffies)) {
947 do_delay(chip); 943 schedule_timeout_uninterruptible(1);
948 status |= igetdword(chip, ICHREG(GLOB_STA)) & nstatus; 944 status |= igetdword(chip, ICHREG(GLOB_STA)) & nstatus;
949 } 945 }
950 946
@@ -959,7 +955,7 @@ static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing)
959 nstatus = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR); 955 nstatus = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR);
960 if (status == nstatus) 956 if (status == nstatus)
961 break; 957 break;
962 do_delay(chip); 958 schedule_timeout_uninterruptible(1);
963 } while (time_after_eq(end_time, jiffies)); 959 } while (time_after_eq(end_time, jiffies));
964 } 960 }
965 961