diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-01-26 12:10:05 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-01-29 00:51:10 -0500 |
commit | 26b4a0ca46985ae9586c194f7859f3838b1230f8 (patch) | |
tree | 15babdf55b3395b833f0ea87ead8839fa1238b31 /arch | |
parent | bb209c8287d2d55ec4a67e3933346e0a3ee0da76 (diff) |
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')
-rw-r--r-- | arch/powerpc/kernel/pci_of_scan.c | 5 |
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 693eb9a25bfa..b6b2e86a50d2 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, | |||
123 | { | 123 | { |
124 | struct pci_dev *dev; | 124 | struct pci_dev *dev; |
125 | const char *type; | 125 | const char *type; |
126 | struct pci_slot *slot; | ||
126 | 127 | ||
127 | dev = alloc_pci_dev(); | 128 | dev = alloc_pci_dev(); |
128 | if (!dev) | 129 | if (!dev) |
@@ -142,6 +143,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
142 | dev->needs_freset = 0; /* pcie fundamental reset required */ | 143 | dev->needs_freset = 0; /* pcie fundamental reset required */ |
143 | set_pcie_port_type(dev); | 144 | set_pcie_port_type(dev); |
144 | 145 | ||
146 | list_for_each_entry(slot, &dev->bus->slots, list) | ||
147 | if (PCI_SLOT(dev->devfn) == slot->number) | ||
148 | dev->slot = slot; | ||
149 | |||
145 | dev->vendor = get_int_prop(node, "vendor-id", 0xffff); | 150 | dev->vendor = get_int_prop(node, "vendor-id", 0xffff); |
146 | dev->device = get_int_prop(node, "device-id", 0xffff); | 151 | dev->device = get_int_prop(node, "device-id", 0xffff); |
147 | dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0); | 152 | dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0); |