1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-22 15:47:37 +00:00

Used cached cdevsw pointer.

This commit is contained in:
Poul-Henning Kamp 2004-09-27 06:34:30 +00:00
parent 743cd76a73
commit a5993c332a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135844

View File

@ -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);
}