diff options
author | Paul Mackerras <paulus@samba.org> | 2005-09-06 03:17:54 (GMT) |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-09 12:11:38 (GMT) |
commit | 1635317facea3094ddf34082cd86797efb1d9f7e (patch) | |
tree | 67d5a4d4c7af00ac4be4608092fec99a32683715 /arch/ppc64/kernel/pci.c | |
parent | b28d2582ce8aafe531d909bb9c4dcf29189e786e (diff) | |
download | linux-1635317facea3094ddf34082cd86797efb1d9f7e.tar.xz |
[PATCH] Separate pci bits out of struct device_node
This patch pulls the PCI-related junk out of struct device_node and
puts it in a separate structure, struct pci_dn. The device_node now
just has a void * pointer in it, which points to a struct pci_dn for
nodes that represent PCI devices. It could potentially be used in
future for device-specific data for other sorts of devices, such as
virtual I/O devices.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/pci.c')
-rw-r--r-- | arch/ppc64/kernel/pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index b5ca7d8..446b465 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c @@ -837,9 +837,11 @@ int pcibios_scan_all_fns(struct pci_bus *bus, int devfn) * device tree. If they are then we need to scan all the * functions of this slot. */ - for (dn = busdn->child; dn; dn = dn->sibling) - if ((dn->devfn >> 3) == (devfn >> 3)) + for (dn = busdn->child; dn; dn = dn->sibling) { + struct pci_dn *pdn = dn->data; + if (pdn && (pdn->devfn >> 3) == (devfn >> 3)) return 1; + } return 0; } |