From 2cfff6e8ef0c0f5f45ea454ed9df5e3ce632c4c6 Mon Sep 17 00:00:00 2001 From: Roger Hardiman Date: Mon, 9 Dec 2002 09:04:09 +0000 Subject: [PATCH] Fix a panic unloading the bktr driver when devfs is in use. PR: kern/36413 --- sys/dev/bktr/bktr_os.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index e26dc33f41f..4aae13cdf35 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. */