summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-25 19:28:49 +0200
committerTakashi Iwai <tiwai@suse.de>2013-04-26 07:36:21 +0200
commit7603935838ae3a85b56f0b5662ab785518d68d39 (patch)
tree95c4cf3de78300586f633023d6a1a5bc95485a3a /sound
parent2fc565e4eaf8fc633bfc741b90e1f28dba732ee1 (diff)
downloadlinux-7603935838ae3a85b56f0b5662ab785518d68d39.tar.gz
linux-7603935838ae3a85b56f0b5662ab785518d68d39.tar.bz2
linux-7603935838ae3a85b56f0b5662ab785518d68d39.zip
ALSA: ali5451: use mdelay instead of large udelay constants
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ali5451/ali5451.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index e760af9d1fb6..53754f5edeb1 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -451,10 +451,10 @@ static int snd_ali_reset_5451(struct snd_ali *codec)
if (pci_dev) {
pci_read_config_dword(pci_dev, 0x7c, &dwVal);
pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000);
- udelay(5000);
+ mdelay(5);
pci_read_config_dword(pci_dev, 0x7c, &dwVal);
pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff);
- udelay(5000);
+ mdelay(5);
}
pci_dev = codec->pci;
@@ -463,14 +463,14 @@ static int snd_ali_reset_5451(struct snd_ali *codec)
udelay(500);
pci_read_config_dword(pci_dev, 0x44, &dwVal);
pci_write_config_dword(pci_dev, 0x44, dwVal & 0xfffbffff);
- udelay(5000);
+ mdelay(5);
wCount = 200;
while(wCount--) {
wReg = snd_ali_codec_peek(codec, 0, AC97_POWERDOWN);
if ((wReg & 0x000f) == 0x000f)
return 0;
- udelay(5000);
+ mdelay(5);
}
/* non-fatal if you have a non PM capable codec */