summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/joy.c
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 08:16:23 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 08:16:23 +0000
commitc86f0c7a71e7ade3e38b325c186a9cf374e0411e (patch)
tree176f04f674860c7cfae9ac5d2ff4d4e1d73cb2b7 /sys/i386/isa/joy.c
parent423ba8f9bc23d93bfc244aca9b12563b1c9de90d (diff)
downloadFreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.zip
FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'sys/i386/isa/joy.c')
-rw-r--r--sys/i386/isa/joy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c
index 942b45a..97225a8 100644
--- a/sys/i386/isa/joy.c
+++ b/sys/i386/isa/joy.c
@@ -41,7 +41,7 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/timerreg.h>
-/* The game port can manage 4 buttons and 4 variable resistors (usually 2
+/* The game port can manage 4 buttons and 4 variable resistors (usually 2
* joysticks, each with 2 buttons and 2 pots.) via the port at address 0x201.
* Getting the state of the buttons is done by reading the game port:
* buttons 1-4 correspond to bits 4-7 and resistors 1-4 (X1, Y1, X2, Y2)
@@ -52,7 +52,7 @@
*/
-/* the formulae below only work if u is ``not too large''. See also
+/* the formulae below only work if u is ``not too large''. See also
* the discussion in microtime.s */
#define usec2ticks(u) (((u) * 19549)>>14)
#define ticks2usec(u) (((u) * 3433)>>12)
@@ -114,7 +114,7 @@ joyopen (dev_t dev, int flag)
joy[unit].timeout[i] = JOY_TIMEOUT;
return 0;
}
-int
+int
joyclose (dev_t dev, int flag)
{
int unit = UNIT (dev);
@@ -132,7 +132,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
int i, t0, t1;
int state = 0, x = 0, y = 0;
struct joystick c;
-
+
disable_intr ();
outb (port, 0xff);
t0 = get_tick ();
@@ -140,7 +140,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
i = usec2ticks(joy[unit].timeout[joypart(dev)]);
while (t0-t1 < i) {
state = inb (port);
- if (joypart(dev) == 1)
+ if (joypart(dev) == 1)
state >>= 2;
t1 = get_tick ();
if (t1 > t0)
@@ -149,7 +149,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
x = t1;
if (!y && !(state & 0x02))
y = t1;
- if (x && y)
+ if (x && y)
break;
}
enable_intr ();
OpenPOWER on IntegriCloud