aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2004-05-18 02:56:06 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2004-05-18 02:56:06 -0700
commit3dfcc8ac75ee105618ad8c0f868289ae7d0349ce (patch)
tree6fa6232012bc44c8d30c4e5f23410505aa2ecf19 /sound
parente1a929afac1039b934e0c3f950f0e6b58ea5cf84 (diff)
downloadhistory-3dfcc8ac75ee105618ad8c0f868289ae7d0349ce.tar.gz
Some more misc wait_ms() conversions to use msleep()
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/dmasound/dac3550a.c5
-rw-r--r--sound/oss/dmasound/dmasound.h6
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c30
-rw-r--r--sound/oss/trident.c2
-rw-r--r--sound/pci/au88x0/au88x0_game.c3
5 files changed, 21 insertions, 25 deletions
diff --git a/sound/oss/dmasound/dac3550a.c b/sound/oss/dmasound/dac3550a.c
index 82bc6bfaf25370..fadf33e5963cb6 100644
--- a/sound/oss/dmasound/dac3550a.c
+++ b/sound/oss/dmasound/dac3550a.c
@@ -9,6 +9,7 @@
#include <linux/module.h>
#include <linux/slab.h>
+#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/ioport.h>
#include <linux/sysctl.h>
@@ -97,14 +98,14 @@ int daca_leave_sleep(void)
/* Do a short sleep, just to make sure I2C bus is awake and paying
* attention to us
*/
- wait_ms(20);
+ msleep(20);
/* Write the sample rate reg the value it needs */
i2c_smbus_write_byte_data(daca_client, 1, 8);
daca_set_volume(cur_left_vol >> 5, cur_right_vol >> 5);
/* Another short delay, just to make sure the other I2C bus writes
* have taken...
*/
- wait_ms(20);
+ msleep(20);
/* Write the global config reg - invert right power amp,
* DAC on, use 5-volt mode */
i2c_smbus_write_byte_data(daca_client, 3, 0x45);
diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h
index 371530fa56754c..1d65e18d727b83 100644
--- a/sound/oss/dmasound/dmasound.h
+++ b/sound/oss/dmasound/dmasound.h
@@ -267,12 +267,6 @@ extern int dmasound_catchRadius;
*/
#define BS_VAL 1
-static inline void wait_ms(unsigned int ms)
-{
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(1 + ms * HZ / 1000);
-}
-
#define SW_INPUT_VOLUME_SCALE 4
#define SW_INPUT_VOLUME_DEFAULT (128 / SW_INPUT_VOLUME_SCALE)
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index 7b5049166afe79..a434e454e1c954 100644
--- a/sound/oss/dmasound/dmasound_awacs.c
+++ b/sound/oss/dmasound/dmasound_awacs.c
@@ -457,9 +457,9 @@ tas_dmasound_init(void)
&gpio_headphone_detect_pol);
write_audio_gpio(gpio_audio_reset, gpio_audio_reset_pol);
- wait_ms(100);
+ msleep(100);
write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol);
- wait_ms(100);
+ msleep(100);
if (gpio_headphone_irq) {
if (request_irq(gpio_headphone_irq,headphone_intr,0,"Headphone detect",0) < 0) {
printk(KERN_ERR "tumbler: Can't request headphone interrupt\n");
@@ -653,7 +653,7 @@ static void PMacIrqCleanup(void)
machine_is_compatible("PowerBook3,2")) && awacs) {
awacs_reg[1] |= MASK_PAROUT0 | MASK_PAROUT1;
awacs_write(MASK_ADDR1 | awacs_reg[1]);
- wait_ms(200);
+ msleep(200);
}
if (awacs)
free_irq(awacs_irq, 0);
@@ -775,10 +775,10 @@ awacs_recalibrate(void)
/* Sorry for the horrible delays... I hope to get that improved
* by making the whole PM process asynchronous in a future version
*/
- wait_ms(750);
+ msleep(750);
awacs_reg[1] |= MASK_CMUTE | MASK_AMUTE;
awacs_write(awacs_reg[1] | MASK_RECALIBRATE | MASK_ADDR1);
- wait_ms(1000);
+ msleep(1000);
awacs_write(awacs_reg[1] | MASK_ADDR1);
}
@@ -1405,9 +1405,9 @@ load_awacs(void)
if (awacs_revision == AWACS_SCREAMER) {
awacs_write(awacs_reg[5] + MASK_ADDR5);
- wait_ms(100);
+ msleep(100);
awacs_write(awacs_reg[6] + MASK_ADDR6);
- wait_ms(2);
+ msleep(2);
awacs_write(awacs_reg[1] + MASK_ADDR1);
awacs_write(awacs_reg[7] + MASK_ADDR7);
}
@@ -1479,7 +1479,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
machine_is_compatible("PowerBook3,2")) && awacs) {
awacs_reg[1] |= MASK_PAROUT0 | MASK_PAROUT1;
awacs_write(MASK_ADDR1 | awacs_reg[1]);
- wait_ms(200);
+ msleep(200);
}
break;
case PBOOK_WAKE:
@@ -1487,12 +1487,12 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
pmac_call_feature(PMAC_FTR_SOUND_CHIP_ENABLE, awacs_node, 0, 1);
if ((machine_is_compatible("PowerBook3,1") ||
machine_is_compatible("PowerBook3,2")) && awacs) {
- wait_ms(100);
+ msleep(100);
awacs_reg[1] &= ~(MASK_PAROUT0 | MASK_PAROUT1);
awacs_write(MASK_ADDR1 | awacs_reg[1]);
- wait_ms(300);
+ msleep(300);
} else
- wait_ms(1000);
+ msleep(1000);
/* restore settings */
switch (awacs_revision) {
case AWACS_TUMBLER:
@@ -1500,14 +1500,14 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
write_audio_gpio(gpio_headphone_mute, gpio_headphone_mute_pol);
write_audio_gpio(gpio_amp_mute, gpio_amp_mute_pol);
write_audio_gpio(gpio_audio_reset, gpio_audio_reset_pol);
- wait_ms(100);
+ msleep(100);
write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol);
- wait_ms(150);
+ msleep(150);
tas_leave_sleep(); /* Stub for now */
headphone_intr(0,0,0);
break;
case AWACS_DACA:
- wait_ms(10); /* Check this !!! */
+ msleep(10); /* Check this !!! */
daca_leave_sleep();
break ; /* dont know how yet */
case AWACS_BURGUNDY:
@@ -2432,7 +2432,7 @@ static void PMacAbortRead(void)
* release the memory.
*/
- wait_ms(100) ; /* give it a (small) chance to act */
+ msleep(100) ; /* give it a (small) chance to act */
/* apply the sledgehammer approach - just stop it now */
diff --git a/sound/oss/trident.c b/sound/oss/trident.c
index cd11ef2b3417ff..e5e14cf5c6d340 100644
--- a/sound/oss/trident.c
+++ b/sound/oss/trident.c
@@ -4294,7 +4294,7 @@ trident_game_open(struct gameport *gameport, int mode)
switch (mode) {
case GAMEPORT_MODE_COOKED:
outb(0x80, TRID_REG(card, T4D_GAME_CR));
- wait_ms(20);
+ msleep(20);
return 0;
case GAMEPORT_MODE_RAW:
outb(0x00, TRID_REG(card, T4D_GAME_CR));
diff --git a/sound/pci/au88x0/au88x0_game.c b/sound/pci/au88x0/au88x0_game.c
index 7e7443d3b2b576..26b0d4e5df4522 100644
--- a/sound/pci/au88x0/au88x0_game.c
+++ b/sound/pci/au88x0/au88x0_game.c
@@ -32,6 +32,7 @@
#include <sound/driver.h>
#include <linux/time.h>
+#include <linux/delay.h>
#include <linux/init.h>
#include <sound/core.h>
#include "au88x0.h"
@@ -81,7 +82,7 @@ static int vortex_game_open(struct gameport *gameport, int mode)
hwwrite(vortex->mmio, VORTEX_CTRL2,
hwread(vortex->mmio,
VORTEX_CTRL2) | CTRL2_GAME_ADCMODE);
- wait_ms(VORTEX_GAME_DWAIT);
+ msleep(VORTEX_GAME_DWAIT);
return 0;
case GAMEPORT_MODE_RAW:
hwwrite(vortex->mmio, VORTEX_CTRL2,