From owner-svn-src-head@FreeBSD.ORG Tue Dec 2 04:54:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE96D106564A; Tue, 2 Dec 2008 04:54:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B91408FC08; Tue, 2 Dec 2008 04:54:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB24sVaT048876; Tue, 2 Dec 2008 04:54:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB24sVNd048874; Tue, 2 Dec 2008 04:54:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812020454.mB24sVNd048874@svn.freebsd.org> From: Warner Losh Date: Tue, 2 Dec 2008 04:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185545 - head/sys/dev/cardbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 04:54:31 -0000 Author: imp Date: Tue Dec 2 04:54:31 2008 New Revision: 185545 URL: http://svn.freebsd.org/changeset/base/185545 Log: Don't call destroy_dev on the alias. This fixes half a dozen PRs I think. Modified: head/sys/dev/cardbus/cardbus_device.c head/sys/dev/cardbus/cardbusvar.h Modified: head/sys/dev/cardbus/cardbus_device.c ============================================================================== --- head/sys/dev/cardbus/cardbus_device.c Tue Dec 2 04:45:33 2008 (r185544) +++ head/sys/dev/cardbus/cardbus_device.c Tue Dec 2 04:54:31 2008 (r185545) @@ -112,15 +112,15 @@ cardbus_device_create(struct cardbus_sof device_t parent, device_t child) { uint32_t minor; + int unit; cardbus_device_buffer_cis(parent, child, &devi->sc_cis); minor = (device_get_unit(sc->sc_dev) << 8) + devi->pci.cfg.func; + unit = device_get_unit(sc->sc_dev); devi->sc_cisdev = make_dev(&cardbus_cdevsw, minor, 0, 0, 0666, - "cardbus%d.%d.cis", device_get_unit(sc->sc_dev), - devi->pci.cfg.func); + "cardbus%d.%d.cis", unit, devi->pci.cfg.func); if (devi->pci.cfg.func == 0) - devi->sc_cisdev_compat = make_dev_alias(devi->sc_cisdev, - "cardbus%d.cis", device_get_unit(sc->sc_dev)); + make_dev_alias(devi->sc_cisdev, "cardbus%d.cis", unit); devi->sc_cisdev->si_drv1 = devi; return (0); } @@ -130,8 +130,6 @@ cardbus_device_destroy(struct cardbus_de { if (devi->sc_cisdev) destroy_dev(devi->sc_cisdev); - if (devi->sc_cisdev_compat) - destroy_dev(devi->sc_cisdev_compat); return (0); } Modified: head/sys/dev/cardbus/cardbusvar.h ============================================================================== --- head/sys/dev/cardbus/cardbusvar.h Tue Dec 2 04:45:33 2008 (r185544) +++ head/sys/dev/cardbus/cardbusvar.h Tue Dec 2 04:54:31 2008 (r185545) @@ -60,7 +60,6 @@ struct cardbus_devinfo } funce; uint32_t fepresent; /* bit mask of funce values present */ struct cdev *sc_cisdev; - struct cdev *sc_cisdev_compat; struct cis_buffer sc_cis; };