Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Dec 2008 04:54:31 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185545 - head/sys/dev/cardbus
Message-ID:  <200812020454.mB24sVNd048874@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812020454.mB24sVNd048874>