Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e1a929af
Commit
e1a929af
authored
May 18, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: remove wait_ms() in place of using msleep()
parent
a8e9fcec
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
17 deletions
+13
-17
drivers/input/gameport/ns558.c
drivers/input/gameport/ns558.c
+3
-2
drivers/input/gameport/vortex.c
drivers/input/gameport/vortex.c
+2
-1
drivers/input/joystick/adi.c
drivers/input/joystick/adi.c
+3
-3
drivers/input/joystick/analog.c
drivers/input/joystick/analog.c
+3
-3
drivers/input/joystick/gf2k.c
drivers/input/joystick/gf2k.c
+2
-2
include/linux/gameport.h
include/linux/gameport.h
+0
-6
No files found.
drivers/input/gameport/ns558.c
View file @
e1a929af
...
...
@@ -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 @@ static void ns558_isa_probe(int io)
i
=
0
;
goto
out
;
}
wait_ms
(
3
);
msleep
(
3
);
/*
* After some time (4ms) the axes shouldn't change anymore.
*/
...
...
@@ -129,7 +130,7 @@ static void ns558_isa_probe(int io)
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
));
...
...
drivers/input/gameport/vortex.c
View file @
e1a929af
...
...
@@ -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 <vojtech@ucw.cz>"
);
...
...
@@ -93,7 +94,7 @@ static int vortex_open(struct gameport *gameport, int mode)
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
);
...
...
drivers/input/joystick/adi.c
View file @
e1a929af
...
...
@@ -321,7 +321,7 @@ static void adi_init_digital(struct gameport *gameport)
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 @@ static void adi_connect(struct gameport *gameport, struct gameport_dev *dev)
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
);
}
...
...
drivers/input/joystick/analog.c
View file @
e1a929af
...
...
@@ -603,18 +603,18 @@ static int analog_init_port(struct gameport *gameport, struct gameport_dev *dev,
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
++
;
...
...
drivers/input/joystick/gf2k.c
View file @
e1a929af
...
...
@@ -260,11 +260,11 @@ static void gf2k_connect(struct gameport *gameport, struct gameport_dev *dev)
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
;
...
...
include/linux/gameport.h
View file @
e1a929af
...
...
@@ -118,10 +118,4 @@ static __inline__ int gameport_time(struct gameport *gameport, int time)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment