summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-02-21 15:13:26 +0000
committerphk <phk@FreeBSD.org>2003-02-21 15:13:26 +0000
commit9aa946589d32570b5f9072729164e74111ace98a (patch)
tree370edd6c82f8299ccece035af1b2441f573823c0 /sys/geom/geom_disk.c
parentf89cdf42be1cbebd7495978fab9d07fe870b2866 (diff)
downloadFreeBSD-src-9aa946589d32570b5f9072729164e74111ace98a.zip
FreeBSD-src-9aa946589d32570b5f9072729164e74111ace98a.tar.gz
NO_GEOM cleanup:
Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r--sys/geom/geom_disk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 1f7e8b0..7cf3c48 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -364,14 +364,12 @@ disk_create(int unit, struct disk *dp, int flags, struct cdevsw *cdevsw, void *
}
void
-disk_destroy(dev_t dev)
+disk_destroy(struct disk *dp)
{
- struct disk *dp;
struct g_geom *gp;
- dp = dev->si_disk;
gp = dp->d_geom;
- g_free(dev);
+ g_free(dp->d_dev);
gp->flags |= G_GEOM_WITHER;
gp->softc = NULL;
g_orphan_provider(LIST_FIRST(&gp->provider), ENXIO);
OpenPOWER on IntegriCloud