diff options
author | Paul Mackerras <paulus@samba.org> | 2005-09-05 23:17:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-09 08:11:38 -0400 |
commit | 1635317facea3094ddf34082cd86797efb1d9f7e (patch) | |
tree | 67d5a4d4c7af00ac4be4608092fec99a32683715 /drivers/pci/hotplug/rpaphp_pci.c | |
parent | b28d2582ce8aafe531d909bb9c4dcf29189e786e (diff) |
[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 'drivers/pci/hotplug/rpaphp_pci.c')
-rw-r--r-- | drivers/pci/hotplug/rpaphp_pci.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index 17a0279ebcb9..49e4d10a6488 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c | |||
@@ -51,10 +51,12 @@ static struct pci_bus *find_bus_among_children(struct pci_bus *bus, | |||
51 | 51 | ||
52 | struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn) | 52 | struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn) |
53 | { | 53 | { |
54 | if (!dn->phb || !dn->phb->bus) | 54 | struct pci_dn *pdn = dn->data; |
55 | |||
56 | if (!pdn || !pdn->phb || !pdn->phb->bus) | ||
55 | return NULL; | 57 | return NULL; |
56 | 58 | ||
57 | return find_bus_among_children(dn->phb->bus, dn); | 59 | return find_bus_among_children(pdn->phb->bus, dn); |
58 | } | 60 | } |
59 | EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus); | 61 | EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus); |
60 | 62 | ||
@@ -229,7 +231,7 @@ rpaphp_pci_config_slot(struct pci_bus *bus) | |||
229 | if (!dn || !dn->child) | 231 | if (!dn || !dn->child) |
230 | return NULL; | 232 | return NULL; |
231 | 233 | ||
232 | slotno = PCI_SLOT(dn->child->devfn); | 234 | slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); |
233 | 235 | ||
234 | /* pci_scan_slot should find all children */ | 236 | /* pci_scan_slot should find all children */ |
235 | num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); | 237 | num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); |