summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-09-27 06:34:30 +0000
committerphk <phk@FreeBSD.org>2004-09-27 06:34:30 +0000
commit3234741a00b21eb3335aaf231c6b0bb761a12be3 (patch)
treeea4604db1315677fb66708f5fe1043d2549f434c
parent27fb35d0b1b0865d3bafca2fdf1f22dd3e601a2b (diff)
downloadFreeBSD-src-3234741a00b21eb3335aaf231c6b0bb761a12be3.zip
FreeBSD-src-3234741a00b21eb3335aaf231c6b0bb761a12be3.tar.gz
Used cached cdevsw pointer.
-rw-r--r--sys/kern/kern_conf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 65eb9e8..1846fa7 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -586,6 +586,8 @@ idestroy_dev(struct cdev *dev)
csw->d_purge(dev);
msleep(csw, &devmtx, PRIBIO, "devprg", hz/10);
}
+ if (csw->d_purge != NULL)
+ printf("All threads purged from %s\n", devtoname(dev));
dev->si_drv1 = 0;
dev->si_drv2 = 0;
@@ -596,8 +598,8 @@ idestroy_dev(struct cdev *dev)
LIST_REMOVE(dev, si_list);
/* If cdevsw has no struct cdev *'s, clean it */
- if (LIST_EMPTY(&dev->si_devsw->d_devs))
- fini_cdevsw(dev->si_devsw);
+ if (LIST_EMPTY(&csw->d_devs))
+ fini_cdevsw(csw);
LIST_REMOVE(dev, si_hash);
}
OpenPOWER on IntegriCloud