[ALSA] Remove superfluous macros
authorTakashi Iwai <tiwai@suse.de>
Thu, 17 Nov 2005 09:35:53 +0000 (10:35 +0100)
committerJaroslav Kysela <perex@suse.cz>
Tue, 3 Jan 2006 11:16:54 +0000 (12:16 +0100)
Modules: ATIIXP driver,ATIIXP-modem driver

Remove superfluous macros for delay.
Call appropriate functions directly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/atiixp.c
sound/pci/atiixp_modem.c

index 8bae10d93529b5c273ca6ebe8f12f42997bde39b..36395d0f3d87f6ce36d2d386786418ce118804a3 100644 (file)
@@ -328,12 +328,6 @@ static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg,
 #define atiixp_update(chip,reg,mask,val) \
        snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val)
 
-/* delay for one tick */
-#define do_delay() do { \
-       schedule_timeout_uninterruptible(1); \
-} while (0)
-
-
 /*
  * handling DMA packets
  *
@@ -513,7 +507,7 @@ static int snd_atiixp_aclink_reset(atiixp_t *chip)
                atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET,
                              ATI_REG_CMD_AC_SYNC);
                atiixp_read(chip, CMD);
-               do_delay();
+               msleep(1);
                atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET);
                if (--timeout) {
                        snd_printk(KERN_ERR "atiixp: codec reset timeout\n");
@@ -561,9 +555,9 @@ static int snd_atiixp_codec_detect(atiixp_t *chip)
        chip->codec_not_ready_bits = 0;
        atiixp_write(chip, IER, CODEC_CHECK_BITS);
        /* wait for the interrupts */
-       timeout = HZ / 10;
+       timeout = 50;
        while (timeout-- > 0) {
-               do_delay();
+               msleep(1);
                if (chip->codec_not_ready_bits)
                        break;
        }
index 3174b6625419607fca5f6d9278ad4e6180b17875..649a999214e28daa4553a12de8dbfb8bbf98b1a1 100644 (file)
@@ -305,12 +305,6 @@ static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg,
 #define atiixp_update(chip,reg,mask,val) \
        snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val)
 
-/* delay for one tick */
-#define do_delay() do { \
-       schedule_timeout_uninterruptible(1); \
-} while (0)
-
-
 /*
  * handling DMA packets
  *
@@ -495,7 +489,7 @@ static int snd_atiixp_aclink_reset(atiixp_t *chip)
                atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET,
                              ATI_REG_CMD_AC_SYNC);
                atiixp_read(chip, CMD);
-               do_delay();
+               msleep(1);
                atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET);
                if (--timeout) {
                        snd_printk(KERN_ERR "atiixp-modem: codec reset timeout\n");
@@ -543,9 +537,9 @@ static int snd_atiixp_codec_detect(atiixp_t *chip)
        chip->codec_not_ready_bits = 0;
        atiixp_write(chip, IER, CODEC_CHECK_BITS);
        /* wait for the interrupts */
-       timeout = HZ / 10;
+       timeout = 50;
        while (timeout-- > 0) {
-               do_delay();
+               msleep(1);
                if (chip->codec_not_ready_bits)
                        break;
        }