aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRoger Hardiman <roger@FreeBSD.org>2002-12-09 09:04:09 +0000
committerRoger Hardiman <roger@FreeBSD.org>2002-12-09 09:04:09 +0000
commit2cfff6e8ef0c0f5f45ea454ed9df5e3ce632c4c6 (patch)
treee911b8d95076dcab650c80d9699378e7b53062b6 /sys
parent990b4b2dc5b91303cf16dc49217fc819dfffa3b0 (diff)
downloadsrc-2cfff6e8ef0c0f5f45ea454ed9df5e3ce632c4c6.tar.gz
src-2cfff6e8ef0c0f5f45ea454ed9df5e3ce632c4c6.zip
Fix a panic unloading the bktr driver when devfs is in use.
PR: kern/36413
Notes
Notes: svn path=/head/; revision=107699
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/bktr/bktr_os.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index e26dc33f41fc..4aae13cdf35f 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -494,20 +494,12 @@ bktr_detach( device_t dev )
/* The memory is retained by the bktr_mem module so we can unload and */
/* then reload the main bktr driver module */
- /* Unregister the /dev/bktrN, tunerN and vbiN devices */
+ /* Unregister the /dev/bktrN, tunerN and vbiN devices,
+ * the aliases for unit 0 are automatically destroyed */
destroy_dev(bktr->vbidev);
destroy_dev(bktr->tunerdev);
destroy_dev(bktr->bktrdev);
- /* If this is unit 0, then destroy the alias entries too */
-#if (__FreeBSD_version >=500000)
- if (unit == 0) {
- destroy_dev(bktr->vbidev_alias);
- destroy_dev(bktr->tunerdev_alias);
- destroy_dev(bktr->bktrdev_alias);
- }
-#endif
-
/*
* Deallocate resources.
*/