summaryrefslogtreecommitdiff
path: root/sys/dev/ata/wd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/wd.c')
-rw-r--r--sys/dev/ata/wd.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 89fb2089b52..640cb8f727b 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.45 2005/11/09 19:05:48 uwe Exp $ */
+/* $OpenBSD: wd.c,v 1.46 2006/01/21 12:18:47 miod Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -182,12 +182,11 @@ int wdprobe(struct device *, void *, void *);
void wdattach(struct device *, struct device *, void *);
int wddetach(struct device *, int);
int wdactivate(struct device *, enum devact);
-void wdzeroref(struct device *);
int wdprint(void *, char *);
struct cfattach wd_ca = {
sizeof(struct wd_softc), wdprobe, wdattach,
- wddetach, wdactivate, wdzeroref
+ wddetach, wdactivate
};
#ifdef __OpenBSD__
@@ -445,6 +444,9 @@ wddetach(struct device *self, int 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);
@@ -453,15 +455,6 @@ wddetach(struct device *self, int flags)
return (0);
}
-void
-wdzeroref(struct device *self)
-{
- struct wd_softc *sc = (struct wd_softc *)self;
-
- /* Detach disk. */
- disk_detach(&sc->sc_dk);
-}
-
/*
* Read/write routine for a buffer. Validates the arguments and schedules the
* transfer. Does not wait for the transfer to complete.