summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/joy.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-10 12:46:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-10 12:46:25 +0000
commitb2df54f4e36d41350a0eee6620394724d4752278 (patch)
treeed5a1dffd53a50a0066edfb145e60f972d36f452 /sys/arch/i386/isa/joy.c
parent7f0bf6cd17ef27999a69603eba1dc3d9b246b6b7 (diff)
simple cleanup
Diffstat (limited to 'sys/arch/i386/isa/joy.c')
-rw-r--r--sys/arch/i386/isa/joy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/isa/joy.c b/sys/arch/i386/isa/joy.c
index aaf893af18b..dc4196591b2 100644
--- a/sys/arch/i386/isa/joy.c
+++ b/sys/arch/i386/isa/joy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: joy.c,v 1.2 1996/04/01 06:39:17 scottr Exp $ */
+/* $NetBSD: joy.c,v 1.3 1996/05/05 19:46:15 christos Exp $ */
/*-
* Copyright (c) 1995 Jean-Marc Zucconi
@@ -41,6 +41,7 @@
#include <machine/pio.h>
#include <machine/cpufunc.h>
#include <machine/joystick.h>
+#include <machine/conf.h>
#include <dev/isa/isavar.h>
#include <dev/isa/isareg.h>
@@ -65,7 +66,7 @@
#define TICKS2USEC(u) (((u) * 3433) >> 12)
-#define JOYPART(d) minor(d) & 1
+#define JOYPART(d) (minor(d) & 1)
#define JOYUNIT(d) minor(d) >> 1 & 3
#ifndef JOY_TIMEOUT
@@ -102,9 +103,9 @@ joyprobe(parent, match, aux)
void *match, *aux;
{
struct isa_attach_args *ia = aux;
+#ifdef WANT_JOYSTICK_CONNECTED
int iobase = ia->ia_iobase;
-#ifdef WANT_JOYSTICK_CONNECTED
outb(iobase, 0xff);
DELAY(10000); /* 10 ms delay */
return (inb(iobase) & 0x0f) != 0x0f;
@@ -122,7 +123,6 @@ joyattach(parent, self, aux)
{
struct joy_softc *sc = (void *) self;
struct isa_attach_args *ia = aux;
- int unit = sc->sc_dev.dv_unit;
int iobase = ia->ia_iobase;
sc->port = iobase;