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.
This commit is contained in:
parent
8b228ca304
commit
4244560bbc
|
@ -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 @@ iomdattach(parent, self, aux)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 @@ static struct wsmouse_accessops wsqms_accessops = {
|
|||
|
||||
|
||||
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 @@ wsqms_enable(void *cookie)
|
|||
{
|
||||
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 @@ wsqms_disable(void *cookie)
|
|||
{
|
||||
struct wsqms_softc *sc = cookie;
|
||||
|
||||
sc->sc_flags &= ~WSQMS_ENABLED;
|
||||
|
||||
callout_stop(&sc->sc_callout);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 @@ wsqms_iomd_probe(struct device *parent, struct cfdata *cf, void *aux)
|
|||
{
|
||||
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 @@ wsqms_iomd_attach(struct device *parent, struct device *self, void *aux)
|
|||
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 */
|
||||
|
|
|
@ -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 wsqms_softc {
|
|||
|
||||
struct callout sc_callout;
|
||||
|
||||
#define WSQMS_ENABLED 0x01
|
||||
int sc_flags;
|
||||
|
||||
int lastx;
|
||||
int lasty;
|
||||
int lastb;
|
||||
|
@ -65,7 +62,7 @@ struct wsqms_softc {
|
|||
|
||||
|
||||
/* function prototypes */
|
||||
extern void wsqms_attach(struct wsqms_softc *sc, struct device *);
|
||||
extern void wsqms_attach(struct wsqms_softc *sc);
|
||||
|
||||
|
||||
/* End of wsqmsvar.h */
|
||||
|
|
Loading…
Reference in New Issue