summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-02 08:12:18 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-02 08:12:18 +0000
commitf840bd6fed6f9fbdcac255c22d35972ffdf14a77 (patch)
tree52cabdbab612163986e2fd5fd4141756426b2d93 /sys/dev/ic
parent49444bf217e2f458d574e2e4bb9ef6d9b7667ea5 (diff)
Make the sensor setup loop less awkward by moving the call to
sensor_attach() out of the for loop header. ok marco@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ciss.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index e108ef9961b..530e106cfd1 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.59 2010/07/01 16:24:37 deraadt Exp $ */
+/* $OpenBSD: ciss.c,v 1.60 2010/07/02 08:12:17 matthew Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -399,8 +399,7 @@ ciss_attach(struct ciss_softc *sc)
strlcpy(sc->sensordev.xname, sc->sc_dev.dv_xname,
sizeof(sc->sensordev.xname));
- for (i = 0; i < sc->maxunits;
- sensor_attach(&sc->sensordev, &sc->sensors[i++])) {
+ for (i = 0; i < sc->maxunits; i++) {
sc->sensors[i].type = SENSOR_DRIVE;
sc->sensors[i].status = SENSOR_S_UNKNOWN;
dev = scsi_get_link(scsibus, i, 0)->device_softc;
@@ -408,6 +407,7 @@ ciss_attach(struct ciss_softc *sc)
sizeof(sc->sensors[i].desc));
strlcpy(sc->sc_lds[i]->xname, dev->dv_xname,
sizeof(sc->sc_lds[i]->xname));
+ sensor_attach(&sc->sensordev, &sc->sensors[i]);
}
if (sensor_task_register(sc, ciss_sensors, 10) == NULL)
free(sc->sensors, M_DEVBUF);