Date: Sun, 30 Sep 2007 13:43:16 GMT From: Marius Strobl <marius@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127021 for review Message-ID: <200709301343.l8UDhGBc096889@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127021 Change 127021 by marius@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709301343.l8UDhGBc096889>
