summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ciss.c
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-01 03:20:40 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-01 03:20:40 +0000
commitb2735ac78382db6f10e2c1a21582733693b825bb (patch)
treeb8011a9cdd5222b156fe4b36da8358ebf62b031f /sys/dev/ic/ciss.c
parent241672bb6dfbe3c1c24caad5b6dc595bb19ffd59 (diff)
Change scsibus(4)'s scsi_link array to an SLIST to save memory on
sparsely populated buses. ok dlg@, krw@
Diffstat (limited to 'sys/dev/ic/ciss.c')
-rw-r--r--sys/dev/ic/ciss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 1e8c8782c4a..aa922917119 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.57 2010/06/28 18:31:02 krw Exp $ */
+/* $OpenBSD: ciss.c,v 1.58 2010/07/01 03:20:38 matthew Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -141,6 +141,7 @@ ciss_attach(struct ciss_softc *sc)
struct ciss_ccb *ccb;
struct ciss_cmd *cmd;
struct ciss_inquiry *inq;
+ struct device *dev;
bus_dma_segment_t seg[1];
int error, i, total, rseg, maxfer;
ciss_lock_t lock;
@@ -401,11 +402,10 @@ ciss_attach(struct ciss_softc *sc)
sensor_attach(&sc->sensordev, &sc->sensors[i++])) {
sc->sensors[i].type = SENSOR_DRIVE;
sc->sensors[i].status = SENSOR_S_UNKNOWN;
- strlcpy(sc->sensors[i].desc, ((struct device *)
- scsibus->sc_link[i][0]->device_softc)->dv_xname,
+ dev = scsi_get_link(scsibus, i, 0)->device_softc;
+ strlcpy(sc->sensors[i].desc, dev->dv_xname,
sizeof(sc->sensors[i].desc));
- strlcpy(sc->sc_lds[i]->xname, ((struct device *)
- scsibus->sc_link[i][0]->device_softc)->dv_xname,
+ strlcpy(sc->sc_lds[i]->xname, dev->dv_xname,
sizeof(sc->sc_lds[i]->xname));
}
if (sensor_task_register(sc, ciss_sensors, 10) == NULL)