diff options
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index ebf18ab7be3..c2c13b249ea 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.100 2005/11/17 23:58:41 miod Exp $ */ +/* $OpenBSD: sd.c,v 1.101 2006/01/21 12:18:49 miod Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -93,7 +93,6 @@ int sdmatch(struct device *, void *, void *); void sdattach(struct device *, struct device *, void *); int sdactivate(struct device *, enum devact); int sddetach(struct device *, int); -void sdzeroref(struct device *); void sdminphys(struct buf *); void sdgetdisklabel(dev_t, struct sd_softc *, struct disklabel *, @@ -110,7 +109,7 @@ void viscpy(u_char *, u_char *, int); struct cfattach sd_ca = { sizeof(struct sd_softc), sdmatch, sdattach, - sddetach, sdactivate, sdzeroref + sddetach, sdactivate }; struct cfdriver sd_cd = { @@ -315,6 +314,9 @@ sddetach(self, flags) if (sc->sc_sdhook != NULL) shutdownhook_disestablish(sc->sc_sdhook); + /* Detach disk. */ + disk_detach(&sc->sc_dk); + #if NRND > 0 /* Unhook the entropy source. */ rnd_detach_source(&sc->rnd_source); @@ -323,16 +325,6 @@ sddetach(self, flags) return (0); } -void -sdzeroref(self) - struct device *self; -{ - struct sd_softc *sd = (struct sd_softc *)self; - - /* Detach disk. */ - disk_detach(&sd->sc_dk); -} - /* * Open the device. Make sure the partition info is as up-to-date as can be. */ |