Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/iomd More wsqms cleanups:



details:   https://anonhg.NetBSD.org/src/rev/295f8f64ad3f
branches:  trunk
changeset: 533055:295f8f64ad3f
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Wed Jun 19 23:49:14 2002 +0000

description:
More wsqms cleanups:
sc_flags was never read.  G/C it.
wsqms_attach() took two arguments that pointed to the same structure.  G/C one
  of them
Since wsqms controls the same device as qms, have it match the same attach
  args.

diffstat:

 sys/arch/arm/iomd/iomd.c       |   5 +----
 sys/arch/arm/iomd/wsqms.c      |  15 +++++++--------
 sys/arch/arm/iomd/wsqms_iomd.c |   9 ++++++---
 sys/arch/arm/iomd/wsqmsvar.h   |   9 +++------
 4 files changed, 17 insertions(+), 21 deletions(-)

diffs (151 lines):

diff -r 6c3888bbc514 -r 295f8f64ad3f sys/arch/arm/iomd/iomd.c
--- a/sys/arch/arm/iomd/iomd.c  Wed Jun 19 23:38:59 2002 +0000
+++ b/sys/arch/arm/iomd/iomd.c  Wed Jun 19 23:49:14 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iomd.c,v 1.3 2002/04/19 01:04:39 wiz Exp $     */
+/*     $NetBSD: iomd.c,v 1.4 2002/06/19 23:49:14 bjh21 Exp $   */
 
 /*
  * Copyright (c) 1996-1997 Mark Brinicombe.
@@ -306,9 +306,6 @@
                ia.ia_qms.qa_iot = iot;
                ia.ia_qms.qa_irq = IRQ_VSYNC;
                config_found(self, &ia, iomdprint);
-
-               ia.ia_qms.qa_name = "wsqms";
-               config_found(self, &ia, iomdprint);
                break;
        }
 }
diff -r 6c3888bbc514 -r 295f8f64ad3f sys/arch/arm/iomd/wsqms.c
--- a/sys/arch/arm/iomd/wsqms.c Wed Jun 19 23:38:59 2002 +0000
+++ b/sys/arch/arm/iomd/wsqms.c Wed Jun 19 23:49:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsqms.c,v 1.6 2002/06/19 23:12:14 bjh21 Exp $ */
+/* $NetBSD: wsqms.c,v 1.7 2002/06/19 23:49:14 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 2001 Reinoud Zandijk
@@ -44,6 +44,8 @@
 
 #include <sys/param.h>
 
+__KERNEL_RCSID(0, "$NetBSD: wsqms.c,v 1.7 2002/06/19 23:49:14 bjh21 Exp $");
+
 #include <sys/callout.h>
 #include <sys/device.h>
 #include <sys/errno.h> 
@@ -83,17 +85,18 @@
 
 
 void
-wsqms_attach(struct wsqms_softc *sc, struct device *self)
+wsqms_attach(struct wsqms_softc *sc)
 {
        struct wsmousedev_attach_args wsmouseargs;
 
        /* set up wsmouse attach arguments */
        wsmouseargs.accessops = &wsqms_accessops;
-       wsmouseargs.accesscookie = self;
+       wsmouseargs.accesscookie = sc;
 
        printf("\n");
 
-       sc->sc_wsmousedev = config_found(self, &wsmouseargs, wsmousedevprint);
+       sc->sc_wsmousedev =
+           config_found(&sc->sc_dev, &wsmouseargs, wsmousedevprint);
 
        callout_init(&sc->sc_callout);
 }
@@ -104,8 +107,6 @@
 {
        struct wsqms_softc *sc = cookie;
 
-       sc->sc_flags |= WSQMS_ENABLED;
-
        callout_reset(&sc->sc_callout, hz / 100, wsqms_intr, sc);
        return 0;
 }
@@ -116,8 +117,6 @@
 {
        struct wsqms_softc *sc = cookie;
 
-       sc->sc_flags &= ~WSQMS_ENABLED;
-
        callout_stop(&sc->sc_callout);
 }
 
diff -r 6c3888bbc514 -r 295f8f64ad3f sys/arch/arm/iomd/wsqms_iomd.c
--- a/sys/arch/arm/iomd/wsqms_iomd.c    Wed Jun 19 23:38:59 2002 +0000
+++ b/sys/arch/arm/iomd/wsqms_iomd.c    Wed Jun 19 23:49:14 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsqms_iomd.c,v 1.4 2002/06/19 23:12:14 bjh21 Exp $     */
+/*     $NetBSD: wsqms_iomd.c,v 1.5 2002/06/19 23:49:14 bjh21 Exp $     */
 
 /*-
  * Copyright (c) 2001 Reinoud Zandijk
@@ -41,6 +41,9 @@
 
 
 #include <sys/param.h>
+
+__KERNEL_RCSID(0, "$NetBSD: wsqms_iomd.c,v 1.5 2002/06/19 23:49:14 bjh21 Exp $");
+
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/types.h>
@@ -68,7 +71,7 @@
 {
        struct qms_attach_args *qa = aux;
 
-       if (strcmp(qa->qa_name, "wsqms") == 0)
+       if (strcmp(qa->qa_name, "qms") == 0)
                return(1);
 
        return(0);
@@ -85,7 +88,7 @@
        sc->sc_ioh = qa->qa_ioh;
        sc->sc_butioh = qa->qa_ioh_but;
 
-       wsqms_attach(sc, self);
+       wsqms_attach(sc);
 }
 
 /* End of wsqms_iomd.c */
diff -r 6c3888bbc514 -r 295f8f64ad3f sys/arch/arm/iomd/wsqmsvar.h
--- a/sys/arch/arm/iomd/wsqmsvar.h      Wed Jun 19 23:38:59 2002 +0000
+++ b/sys/arch/arm/iomd/wsqmsvar.h      Wed Jun 19 23:49:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsqmsvar.h,v 1.3 2002/06/19 23:05:07 bjh21 Exp $ */
+/* $NetBSD: wsqmsvar.h,v 1.4 2002/06/19 23:49:14 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 2001 Reinoud Zandijk
@@ -46,7 +46,7 @@
 /* softc structure for the wsqms device */
 
 struct wsqms_softc {
-       struct device  sc_device;
+       struct device  sc_dev;
        struct device *sc_wsmousedev;
 
        bus_space_tag_t sc_iot;         /* bus tag */
@@ -55,9 +55,6 @@
 
        struct callout sc_callout;
 
-#define WSQMS_ENABLED 0x01
-       int sc_flags;
-
        int lastx;
        int lasty;
        int lastb;
@@ -65,7 +62,7 @@
 
 
 /* function prototypes */
-extern void wsqms_attach(struct wsqms_softc *sc, struct device *);
+extern void wsqms_attach(struct wsqms_softc *sc);
 
 
 /* End of wsqmsvar.h */



Home | Main Index | Thread Index | Old Index