summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp_pci.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-09-06 05:17:54 +0200
committerPaul Mackerras <paulus@samba.org>2005-09-09 14:11:38 +0200
commit1635317facea3094ddf34082cd86797efb1d9f7e (patch)
tree67d5a4d4c7af00ac4be4608092fec99a32683715 /drivers/pci/hotplug/rpaphp_pci.c
parent[PATCH] ppc64: remove use of asm/segment.h (diff)
downloadlinux-1635317facea3094ddf34082cd86797efb1d9f7e.tar.xz
linux-1635317facea3094ddf34082cd86797efb1d9f7e.zip
[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.c8
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,
struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn)
{
- if (!dn->phb || !dn->phb->bus)
+ struct pci_dn *pdn = dn->data;
+
+ if (!pdn || !pdn->phb || !pdn->phb->bus)
return NULL;
- return find_bus_among_children(dn->phb->bus, dn);
+ return find_bus_among_children(pdn->phb->bus, dn);
}
EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus);
@@ -229,7 +231,7 @@ rpaphp_pci_config_slot(struct pci_bus *bus)
if (!dn || !dn->child)
return NULL;
- slotno = PCI_SLOT(dn->child->devfn);
+ slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
/* pci_scan_slot should find all children */
num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));