aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 04:35:53 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:16:54 -0500
commitbfdcbace6c76cab54f1651349816dc35cc8f12b8 (patch)
treea47854af645cc38f0a53154c313d8691c2d4fe4a /sound/pci/atiixp.c
parent03f9ae2505cf2f5d56c197b4045ed9dba5ce8912 (diff)
[ALSA] Remove superfluous macros
Modules: ATIIXP driver,ATIIXP-modem driver Remove superfluous macros for delay. Call appropriate functions directly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/atiixp.c')
-rw-r--r--sound/pci/atiixp.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 8bae10d93529..36395d0f3d87 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -328,12 +328,6 @@ static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg,
328#define atiixp_update(chip,reg,mask,val) \ 328#define atiixp_update(chip,reg,mask,val) \
329 snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val) 329 snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val)
330 330
331/* delay for one tick */
332#define do_delay() do { \
333 schedule_timeout_uninterruptible(1); \
334} while (0)
335
336
337/* 331/*
338 * handling DMA packets 332 * handling DMA packets
339 * 333 *
@@ -513,7 +507,7 @@ static int snd_atiixp_aclink_reset(atiixp_t *chip)
513 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, 507 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET,
514 ATI_REG_CMD_AC_SYNC); 508 ATI_REG_CMD_AC_SYNC);
515 atiixp_read(chip, CMD); 509 atiixp_read(chip, CMD);
516 do_delay(); 510 msleep(1);
517 atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); 511 atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET);
518 if (--timeout) { 512 if (--timeout) {
519 snd_printk(KERN_ERR "atiixp: codec reset timeout\n"); 513 snd_printk(KERN_ERR "atiixp: codec reset timeout\n");
@@ -561,9 +555,9 @@ static int snd_atiixp_codec_detect(atiixp_t *chip)
561 chip->codec_not_ready_bits = 0; 555 chip->codec_not_ready_bits = 0;
562 atiixp_write(chip, IER, CODEC_CHECK_BITS); 556 atiixp_write(chip, IER, CODEC_CHECK_BITS);
563 /* wait for the interrupts */ 557 /* wait for the interrupts */
564 timeout = HZ / 10; 558 timeout = 50;
565 while (timeout-- > 0) { 559 while (timeout-- > 0) {
566 do_delay(); 560 msleep(1);
567 if (chip->codec_not_ready_bits) 561 if (chip->codec_not_ready_bits)
568 break; 562 break;
569 } 563 }