From owner-freebsd-current@FreeBSD.ORG Tue Aug 24 03:15:28 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69B2416A4CE for ; Tue, 24 Aug 2004 03:15:28 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1573E43D4C for ; Tue, 24 Aug 2004 03:15:28 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i7O3EsjP076153 for ; Mon, 23 Aug 2004 21:14:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Aug 2004 21:15:13 -0600 (MDT) Message-Id: <20040823.211513.08944324.imp@bsdimp.com> To: current@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: speaker load/unload bug fix X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 03:15:28 -0000 Someone posted a bug where you did: kldload speaker kldunload speaker devinfo -v Here's a patch... Warner Index: subr_bus.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v retrieving revision 1.156 diff -u -r1.156 subr_bus.c --- subr_bus.c 18 Jul 2004 16:30:31 -0000 1.156 +++ subr_bus.c 24 Aug 2004 03:07:18 -0000 @@ -1471,7 +1471,6 @@ devclass_delete_device(child->devclass, child); TAILQ_REMOVE(&dev->children, child, link); TAILQ_REMOVE(&bus_data_devices, child, devlink); - device_set_desc(child, NULL); kobj_delete((kobj_t) child, M_BUS); bus_data_generation_update(); @@ -2232,6 +2231,7 @@ dev->state = DS_NOTPRESENT; device_set_driver(dev, NULL); + device_set_desc(child, NULL); device_sysctl_fini(dev); return (0);