Author: jhb
Date: Wed Apr 27 19:54:56 2016
New Revision: 298717
URL: https://svnweb.freebsd.org/changeset/base/298717

Log:
  Fix build for systems without PCI_RES_BUS.
  
  Submitted by: vangyzen

Modified:
  head/sys/dev/pci/pci.c

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c      Wed Apr 27 19:38:24 2016        (r298716)
+++ head/sys/dev/pci/pci.c      Wed Apr 27 19:54:56 2016        (r298717)
@@ -4150,8 +4150,8 @@ pci_detach(device_t dev)
        error = bus_generic_detach(dev);
        if (error)
                return (error);
-       sc = device_get_softc(dev);
 #ifdef PCI_RES_BUS
+       sc = device_get_softc(dev);
        error = bus_release_resource(dev, PCI_RES_BUS, 0, sc->sc_bus);
        if (error)
                return (error);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to