diff options
author | phk <phk@FreeBSD.org> | 2003-02-23 18:31:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-02-23 18:31:17 +0000 |
commit | 4ecb8739962dd2cdb8f231a4af25b788ceadad85 (patch) | |
tree | db5ef867c55ac5961fe6a0f5d384eacba1f234ea /sys/dev | |
parent | 5d296f914c841f0629a424a0e24d5e3dc707416f (diff) | |
download | FreeBSD-src-4ecb8739962dd2cdb8f231a4af25b788ceadad85.zip FreeBSD-src-4ecb8739962dd2cdb8f231a4af25b788ceadad85.tar.gz |
Fix the detach code to actually detach the disk instance created
during attach.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ida/ida_disk.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 26fcd9f..fc101c2 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -83,7 +83,6 @@ static struct cdevsw id_cdevsw = { static devclass_t idad_devclass; static struct cdevsw idaddisk_cdevsw; -static int disks_registered = 0; static device_method_t idad_methods[] = { DEVMETHOD(device_probe, idad_probe), @@ -269,7 +268,6 @@ idad_attach(device_t dev) dsk->si_drv1 = drv; dsk->si_iosize_max = DFLTPHYS; /* XXX guess? */ - disks_registered++; return (0); } @@ -281,8 +279,6 @@ idad_detach(device_t dev) drv = (struct idad_softc *)device_get_softc(dev); devstat_remove_entry(&drv->stats); - - if (--disks_registered == 0) - cdevsw_remove(&idaddisk_cdevsw); + disk_destroy(&drv->disk); return (0); } |