Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3c58fb1 authored by Anton Blanchard's avatar Anton Blanchard Committed by Paul Mackerras
Browse files

[POWERPC] Dont look for class-code in pci children



Looking for class-code in PCI children breaks with direct slots. Lets
just count all children.

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 1e92a550
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -331,12 +331,8 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus)
	if (isa_dn_orig)
		of_node_put(isa_dn_orig);

	/* Count number of direct PCI children of the PHB.
	 * All PCI device nodes have class-code property, so it's
	 * an easy way to find them.
	 */
	/* Count number of direct PCI children of the PHB. */
	for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling)
		if (get_property(tmp, "class-code", NULL))
		children++;

	DBG("Children: %d\n", children);