diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-25 13:28:49 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-26 01:36:21 -0400 |
commit | 7603935838ae3a85b56f0b5662ab785518d68d39 (patch) | |
tree | 95c4cf3de78300586f633023d6a1a5bc95485a3a /sound | |
parent | 2fc565e4eaf8fc633bfc741b90e1f28dba732ee1 (diff) |
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.c | 8 |
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) | |||
451 | if (pci_dev) { | 451 | if (pci_dev) { |
452 | pci_read_config_dword(pci_dev, 0x7c, &dwVal); | 452 | pci_read_config_dword(pci_dev, 0x7c, &dwVal); |
453 | pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000); | 453 | pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000); |
454 | udelay(5000); | 454 | mdelay(5); |
455 | pci_read_config_dword(pci_dev, 0x7c, &dwVal); | 455 | pci_read_config_dword(pci_dev, 0x7c, &dwVal); |
456 | pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff); | 456 | pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff); |
457 | udelay(5000); | 457 | mdelay(5); |
458 | } | 458 | } |
459 | 459 | ||
460 | pci_dev = codec->pci; | 460 | pci_dev = codec->pci; |
@@ -463,14 +463,14 @@ static int snd_ali_reset_5451(struct snd_ali *codec) | |||
463 | udelay(500); | 463 | udelay(500); |
464 | pci_read_config_dword(pci_dev, 0x44, &dwVal); | 464 | pci_read_config_dword(pci_dev, 0x44, &dwVal); |
465 | pci_write_config_dword(pci_dev, 0x44, dwVal & 0xfffbffff); | 465 | pci_write_config_dword(pci_dev, 0x44, dwVal & 0xfffbffff); |
466 | udelay(5000); | 466 | mdelay(5); |
467 | 467 | ||
468 | wCount = 200; | 468 | wCount = 200; |
469 | while(wCount--) { | 469 | while(wCount--) { |
470 | wReg = snd_ali_codec_peek(codec, 0, AC97_POWERDOWN); | 470 | wReg = snd_ali_codec_peek(codec, 0, AC97_POWERDOWN); |
471 | if ((wReg & 0x000f) == 0x000f) | 471 | if ((wReg & 0x000f) == 0x000f) |
472 | return 0; | 472 | return 0; |
473 | udelay(5000); | 473 | mdelay(5); |
474 | } | 474 | } |
475 | 475 | ||
476 | /* non-fatal if you have a non PM capable codec */ | 476 | /* non-fatal if you have a non PM capable codec */ |