PERFORCE change 127021 for review
Marius Strobl
marius at FreeBSD.org
Sun Sep 30 06:43:17 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=127021
Change 127021 by marius at flak on 2007/09/30 13:42:15
- Take advantage of DEFINE_CLASS_0.
- Use PCI domains (mandatory for Tomatillos, see comment in
schizo_attach()).
Affected files ...
.. //depot/projects/usiii/sparc64/pci/schizo.c#3 edit
Differences ...
==== //depot/projects/usiii/sparc64/pci/schizo.c#3 (text+ko) ====
@@ -156,15 +156,11 @@
{ 0, 0 }
};
-static driver_t schizo_driver = {
- "pcib",
- schizo_methods,
- sizeof(struct schizo_softc),
-};
+static devclass_t schizo_devclass;
-static devclass_t pcib_devclass;
-
-DRIVER_MODULE(schizo, nexus, schizo_driver, pcib_devclass, 0, 0);
+DEFINE_CLASS_0(pcib, schizo_driver, schizo_methods,
+ sizeof(struct schizo_softc));
+DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0);
static SLIST_HEAD(, schizo_softc) schizo_softcs =
SLIST_HEAD_INITIALIZER(schizo_softcs);
@@ -893,6 +889,9 @@
sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = device_get_unit(dev);
+ return (0);
case PCIB_IVAR_BUS:
*result = sc->sc_pci_secbus;
return (0);
More information about the p4-projects
mailing list