PERFORCE change 101249 for review

Warner Losh imp at FreeBSD.org
Mon Jul 10 23:02:56 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101249

Change 101249 by imp at imp_lighthouse on 2006/07/10 23:02:29

	Polish.  We can implement wiring here in about 8 lines of code.

Affected files ...

.. //depot/projects/arm/src/sys/dev/pci/pci.c#10 edit

Differences ...

==== //depot/projects/arm/src/sys/dev/pci/pci.c#10 (text+ko) ====

@@ -2005,17 +2005,15 @@
 void
 pci_hint_device_unit(device_t bus, device_t child, int *unit)
 {
-	struct pci_devinfo *dinfo;
-	pcicfgregs *cfg;
+	struct pci_devinfo *dinfo = device_get_ivars(child);
 	int i;
 	char buf[10];
 
-	dinfo = device_get_ivars(child);
-	cfg = &dinfo->cfg;
+	snprintf(buf, sizeof(buf), "%d:%d:%d", dinfo->cfg.bus, dinfo->cfg.slot,
+	    dinfo->cfg.func);
 	i = 0;
-	snprintf(buf, sizeof(buf), "%d:%d:%d", cfg->bus, cfg->slot, cfg->func);
 	resource_find_dev(&i, device_get_name(child), unit, "location", buf);
-	device_printf(bus, "%s now %d\n", device_get_nameunit(child), *unit);
+
 	return;
 }
 


More information about the p4-projects mailing list