summaryrefslogtreecommitdiffstats
path: root/sys/dev/ida/ida_disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ida/ida_disk.c')
-rw-r--r--sys/dev/ida/ida_disk.c6
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);
}
OpenPOWER on IntegriCloud