aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 04:21:19 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:16:37 -0500
commitbdbae7e62837c22c5399df0789a24e9d8a1d675f (patch)
tree4bffa9bf42f5b7541bc432f8b2437e8130278f88 /sound/drivers
parentc8eb6ba16a5803fab9cc0d1d0dd04a75bf91b6d5 (diff)
[ALSA] Remove snd_vx_delay() function
Replace snd_vx_delay() with appropriate delay/sleep functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/vx/vx_core.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index 4697b1d75cb..e6e4cf99741 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -41,18 +41,6 @@ MODULE_LICENSE("GPL");
41 41
42 42
43/* 43/*
44 * snd_vx_delay - delay for the specified time
45 * @xmsec: the time to delay in msec
46 */
47void snd_vx_delay(vx_core_t *chip, int xmsec)
48{
49 if (! in_interrupt() && xmsec >= 1000 / HZ)
50 msleep(xmsec);
51 else
52 mdelay(xmsec);
53}
54
55/*
56 * vx_check_reg_bit - wait for the specified bit is set/reset on a register 44 * vx_check_reg_bit - wait for the specified bit is set/reset on a register
57 * @reg: register to check 45 * @reg: register to check
58 * @mask: bit mask 46 * @mask: bit mask
@@ -76,7 +64,7 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time)
76 do { 64 do {
77 if ((snd_vx_inb(chip, reg) & mask) == bit) 65 if ((snd_vx_inb(chip, reg) & mask) == bit)
78 return 0; 66 return 0;
79 //snd_vx_delay(chip, 10); 67 //msleep(10);
80 } while (time_after_eq(end_time, jiffies)); 68 } while (time_after_eq(end_time, jiffies));
81 snd_printd(KERN_DEBUG "vx_check_reg_bit: timeout, reg=%s, mask=0x%x, val=0x%x\n", reg_names[reg], mask, snd_vx_inb(chip, reg)); 69 snd_printd(KERN_DEBUG "vx_check_reg_bit: timeout, reg=%s, mask=0x%x, val=0x%x\n", reg_names[reg], mask, snd_vx_inb(chip, reg));
82 return -EIO; 70 return -EIO;
@@ -664,7 +652,7 @@ int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
664 652
665 if ((err = snd_vx_load_boot_image(chip, boot)) < 0) 653 if ((err = snd_vx_load_boot_image(chip, boot)) < 0)
666 return err; 654 return err;
667 snd_vx_delay(chip, 10); 655 msleep(10);
668 656
669 return 0; 657 return 0;
670} 658}
@@ -704,7 +692,7 @@ int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
704 } 692 }
705 snd_printdd(KERN_DEBUG "checksum = 0x%08x\n", csum); 693 snd_printdd(KERN_DEBUG "checksum = 0x%08x\n", csum);
706 694
707 snd_vx_delay(chip, 200); 695 msleep(200);
708 696
709 if ((err = vx_wait_isr_bit(chip, ISR_CHK)) < 0) 697 if ((err = vx_wait_isr_bit(chip, ISR_CHK)) < 0)
710 return err; 698 return err;
@@ -831,7 +819,6 @@ EXPORT_SYMBOL(snd_vx_create);
831EXPORT_SYMBOL(snd_vx_setup_firmware); 819EXPORT_SYMBOL(snd_vx_setup_firmware);
832EXPORT_SYMBOL(snd_vx_free_firmware); 820EXPORT_SYMBOL(snd_vx_free_firmware);
833EXPORT_SYMBOL(snd_vx_irq_handler); 821EXPORT_SYMBOL(snd_vx_irq_handler);
834EXPORT_SYMBOL(snd_vx_delay);
835EXPORT_SYMBOL(snd_vx_dsp_boot); 822EXPORT_SYMBOL(snd_vx_dsp_boot);
836EXPORT_SYMBOL(snd_vx_dsp_load); 823EXPORT_SYMBOL(snd_vx_dsp_load);
837EXPORT_SYMBOL(snd_vx_load_boot_image); 824EXPORT_SYMBOL(snd_vx_load_boot_image);