Skip to content

Commit

Permalink
[POWERPC] Dont look for class-code in pci children
Browse files Browse the repository at this point in the history
Looking for class-code in PCI children breaks with direct slots. Lets
just count all children.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Jun 21, 2006
1 parent 1e92a55 commit d3c58fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/powerpc/platforms/pseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,9 @@ 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++;
children++;

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

Expand Down

0 comments on commit d3c58fb

Please sign in to comment.