diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2007-01-05 06:00:26 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2007-01-05 06:00:26 +0000 |
commit | e10a5dcc087d8fd38c95670ae9ae7568efa5fc3b (patch) | |
tree | 58e695a1d799acdd74884ba151a0a31de1bb19e7 /sys/dev/isa | |
parent | 1091d74b64109d8e398d4f4cfe8a6f8bbbe16368 (diff) |
Change slightly to not need one of the softc members.
From Constantine A. Murenin
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/aps.c | 6 | ||||
-rw-r--r-- | sys/dev/isa/apsvar.h | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/isa/aps.c b/sys/dev/isa/aps.c index aa9ccd05527..15479b574dd 100644 --- a/sys/dev/isa/aps.c +++ b/sys/dev/isa/aps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aps.c,v 1.9 2006/12/23 17:46:39 deraadt Exp $ */ +/* $OpenBSD: aps.c,v 1.10 2007/01/05 06:00:25 jsg Exp $ */ /* * Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org> * @@ -146,8 +146,6 @@ aps_attach(struct device *parent, struct device *self, void *aux) if (!aps_init(iot, ioh)) goto out; - sc->numsensors = APS_NUM_SENSORS; - sc->sensors[APS_SENSOR_XACCEL].type = SENSOR_INTEGER; snprintf(sc->sensors[APS_SENSOR_XACCEL].desc, sizeof(sc->sensors[APS_SENSOR_XACCEL].desc), "X_ACCEL"); @@ -187,7 +185,7 @@ aps_attach(struct device *parent, struct device *self, void *aux) /* stop hiding and report to the authorities */ strlcpy(sc->sensordev.xname, sc->sc_dev.dv_xname, sizeof(sc->sensordev.xname)); - for (i = 0; i < sc->numsensors; i++) { + for (i = 0; i < APS_NUM_SENSORS ; i++) { sensor_attach(&sc->sensordev, &sc->sensors[i]); } sensordev_install(&sc->sensordev); diff --git a/sys/dev/isa/apsvar.h b/sys/dev/isa/apsvar.h index 7feb3c3f7b7..474b8a80d87 100644 --- a/sys/dev/isa/apsvar.h +++ b/sys/dev/isa/apsvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: apsvar.h,v 1.2 2006/12/23 17:46:39 deraadt Exp $ */ +/* $OpenBSD: apsvar.h,v 1.3 2007/01/05 06:00:25 jsg Exp $ */ /* * Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org> * @@ -36,7 +36,6 @@ struct aps_softc { struct sensor sensors[APS_NUM_SENSORS]; struct sensordev sensordev; - u_int numsensors; void (*refresh_sensor_data)(struct aps_softc *); struct sensor_rec aps_data; |