ChangeSet 1.1751, 2004/05/18 16:51:33-07:00, [EMAIL PROTECTED]
Input: remove wait_ms() in place of using msleep()
drivers/input/gameport/ns558.c | 5 +++--
drivers/input/gameport/vortex.c | 3 ++-
drivers/input/joystick/adi.c | 6 +++---
drivers/input/joystick/analog.c | 6 +++---
drivers/input/joystick/gf2k.c | 4 ++--
include/linux/gameport.h | 6 ------
6 files changed, 13 insertions(+), 17 deletions(-)
diff -Nru a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c
--- a/drivers/input/gameport/ns558.c Tue May 18 17:04:38 2004
+++ b/drivers/input/gameport/ns558.c Tue May 18 17:04:38 2004
@@ -35,6 +35,7 @@
#include <linux/ioport.h>
#include <linux/config.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include <linux/gameport.h>
#include <linux/slab.h>
#include <linux/pnp.h>
@@ -103,7 +104,7 @@
i = 0;
goto out;
}
- wait_ms(3);
+ msleep(3);
/*
* After some time (4ms) the axes shouldn't change anymore.
*/
@@ -129,7 +130,7 @@
outb(0xff, io & (-1 << i));
for (j = b = 0; j < 1000; j++)
if (inb(io & (-1 << i)) != inb((io & (-1 << i)) + (1 << i) -
1)) b++;
- wait_ms(3);
+ msleep(3);
if (b > 300) { /* We allow 30%
difference */
release_region(io & (-1 << i), (1 << i));
diff -Nru a/drivers/input/gameport/vortex.c b/drivers/input/gameport/vortex.c
--- a/drivers/input/gameport/vortex.c Tue May 18 17:04:38 2004
+++ b/drivers/input/gameport/vortex.c Tue May 18 17:04:38 2004
@@ -40,6 +40,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/delay.h>
#include <linux/gameport.h>
MODULE_AUTHOR("Vojtech Pavlik <[EMAIL PROTECTED]>");
@@ -93,7 +94,7 @@
switch (mode) {
case GAMEPORT_MODE_COOKED:
writeb(0x40, vortex->io + VORTEX_GCR);
- wait_ms(VORTEX_DATA_WAIT);
+ msleep(VORTEX_DATA_WAIT);
return 0;
case GAMEPORT_MODE_RAW:
writeb(0x00, vortex->io + VORTEX_GCR);
diff -Nru a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
--- a/drivers/input/joystick/adi.c Tue May 18 17:04:38 2004
+++ b/drivers/input/joystick/adi.c Tue May 18 17:04:38 2004
@@ -321,7 +321,7 @@
for (i = 0; seq[i]; i++) {
gameport_trigger(gameport);
- if (seq[i] > 0) wait_ms(seq[i]);
+ if (seq[i] > 0) msleep(seq[i]);
if (seq[i] < 0) mdelay(-seq[i]);
}
}
@@ -513,9 +513,9 @@
return;
}
- wait_ms(ADI_INIT_DELAY);
+ msleep(ADI_INIT_DELAY);
if (adi_read(port)) {
- wait_ms(ADI_DATA_DELAY);
+ msleep(ADI_DATA_DELAY);
adi_read(port);
}
diff -Nru a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
--- a/drivers/input/joystick/analog.c Tue May 18 17:04:38 2004
+++ b/drivers/input/joystick/analog.c Tue May 18 17:04:38 2004
@@ -603,18 +603,18 @@
gameport_trigger(gameport);
t = gameport_read(gameport);
- wait_ms(ANALOG_MAX_TIME);
+ msleep(ANALOG_MAX_TIME);
port->mask = (gameport_read(gameport) ^ t) & t & 0xf;
port->fuzz = (port->speed * ANALOG_FUZZ_MAGIC) / port->loop / 1000 +
ANALOG_FUZZ_BITS;
for (i = 0; i < ANALOG_INIT_RETRIES; i++) {
if (!analog_cooked_read(port)) break;
- wait_ms(ANALOG_MAX_TIME);
+ msleep(ANALOG_MAX_TIME);
}
u = v = 0;
- wait_ms(ANALOG_MAX_TIME);
+ msleep(ANALOG_MAX_TIME);
t = gameport_time(gameport, ANALOG_MAX_TIME * 1000);
gameport_trigger(gameport);
while ((gameport_read(port->gameport) & port->mask) && (u < t)) u++;
diff -Nru a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
--- a/drivers/input/joystick/gf2k.c Tue May 18 17:04:38 2004
+++ b/drivers/input/joystick/gf2k.c Tue May 18 17:04:38 2004
@@ -260,11 +260,11 @@
gf2k_trigger_seq(gameport, gf2k_seq_reset);
- wait_ms(GF2K_TIMEOUT);
+ msleep(GF2K_TIMEOUT);
gf2k_trigger_seq(gameport, gf2k_seq_digital);
- wait_ms(GF2K_TIMEOUT);
+ msleep(GF2K_TIMEOUT);
if (gf2k_read_packet(gameport, GF2K_LENGTH, data) < 12)
goto fail2;
diff -Nru a/include/linux/gameport.h b/include/linux/gameport.h
--- a/include/linux/gameport.h Tue May 18 17:04:38 2004
+++ b/include/linux/gameport.h Tue May 18 17:04:38 2004
@@ -118,10 +118,4 @@
return (time * gameport->speed) / 1000;
}
-static __inline__ void wait_ms(unsigned int ms)
-{
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1 + ms * HZ / 1000);
-}
-
#endif
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel