summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-01-26 17:10:05 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-01-29 16:51:10 +1100
commit26b4a0ca46985ae9586c194f7859f3838b1230f8 (patch)
tree15babdf55b3395b833f0ea87ead8839fa1238b31 /arch/powerpc
parentbb209c8287d2d55ec4a67e3933346e0a3ee0da76 (diff)
downloadop-kernel-dev-26b4a0ca46985ae9586c194f7859f3838b1230f8.zip
op-kernel-dev-26b4a0ca46985ae9586c194f7859f3838b1230f8.tar.gz
powerpc/pci: Add missing hookup to pci_slot
Add missing hookup to existing pci_slot when building the pci_dev from scratch off the Open Firmware device-tree Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 693eb9a..b6b2e86 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -123,6 +123,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
{
struct pci_dev *dev;
const char *type;
+ struct pci_slot *slot;
dev = alloc_pci_dev();
if (!dev)
@@ -142,6 +143,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
dev->needs_freset = 0; /* pcie fundamental reset required */
set_pcie_port_type(dev);
+ list_for_each_entry(slot, &dev->bus->slots, list)
+ if (PCI_SLOT(dev->devfn) == slot->number)
+ dev->slot = slot;
+
dev->vendor = get_int_prop(node, "vendor-id", 0xffff);
dev->device = get_int_prop(node, "device-id", 0xffff);
dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0);
OpenPOWER on IntegriCloud