diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 22:29:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 22:29:33 -0500 |
commit | 215e871aaa3d94540121a3809d80d0c5e5686e4f (patch) | |
tree | 0ed6469c5ad04db8cfa0edb58c676d5155df20cd /drivers/pci/bus.c | |
parent | b6cf160c4b788a31f6a4017a469b956ca77febf4 (diff) | |
parent | fd7d1ced29e5beb88c9068801da7a362606d8273 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (64 commits)
PCI: make pci_bus a struct device
PCI: fix codingstyle issues in include/linux/pci.h
PCI: fix codingstyle issues in drivers/pci/pci.h
PCI: PCIE ASPM support
PCI: Fix fakephp deadlock
PCI: modify SB700 SATA MSI quirk
PCI: Run ACPI _OSC method on root bridges only
PCI ACPI: AER driver should only register PCIe devices with _OSC
PCI ACPI: Added a function to register _OSC with only PCIe devices.
PCI: constify function pointer tables
PCI: Convert drivers/pci/proc.c to use unlocked_ioctl
pciehp: block new requests from the device before power off
pciehp: workaround against Bad DLLP during power off
pciehp: wait for 1000ms before LED operation after power off
PCI: Remove pci_enable_device_bars() from documentation
PCI: Remove pci_enable_device_bars()
PCI: Remove users of pci_enable_device_bars()
PCI: Add pci_enable_device_{io,mem} intefaces
PCI: avoid save the same type of cap multiple times
PCI: correctly initialize a structure for pcie_save_pcix_state()
...
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 9e5ea074ad20..ef5a6a245f5f 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -108,6 +108,7 @@ int pci_bus_add_device(struct pci_dev *dev) | |||
108 | void pci_bus_add_devices(struct pci_bus *bus) | 108 | void pci_bus_add_devices(struct pci_bus *bus) |
109 | { | 109 | { |
110 | struct pci_dev *dev; | 110 | struct pci_dev *dev; |
111 | struct pci_bus *child_bus; | ||
111 | int retval; | 112 | int retval; |
112 | 113 | ||
113 | list_for_each_entry(dev, &bus->devices, bus_list) { | 114 | list_for_each_entry(dev, &bus->devices, bus_list) { |
@@ -138,11 +139,19 @@ void pci_bus_add_devices(struct pci_bus *bus) | |||
138 | up_write(&pci_bus_sem); | 139 | up_write(&pci_bus_sem); |
139 | } | 140 | } |
140 | pci_bus_add_devices(dev->subordinate); | 141 | pci_bus_add_devices(dev->subordinate); |
141 | retval = sysfs_create_link(&dev->subordinate->class_dev.kobj, | 142 | |
142 | &dev->dev.kobj, "bridge"); | 143 | /* register the bus with sysfs as the parent is now |
144 | * properly registered. */ | ||
145 | child_bus = dev->subordinate; | ||
146 | child_bus->dev.parent = child_bus->bridge; | ||
147 | retval = device_register(&child_bus->dev); | ||
148 | if (!retval) | ||
149 | retval = device_create_file(&child_bus->dev, | ||
150 | &dev_attr_cpuaffinity); | ||
143 | if (retval) | 151 | if (retval) |
144 | dev_err(&dev->dev, "Error creating sysfs " | 152 | dev_err(&dev->dev, "Error registering pci_bus" |
145 | "bridge symlink, continuing...\n"); | 153 | " device bridge symlink," |
154 | " continuing...\n"); | ||
146 | } | 155 | } |
147 | } | 156 | } |
148 | } | 157 | } |
@@ -204,7 +213,6 @@ void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), | |||
204 | } | 213 | } |
205 | up_read(&pci_bus_sem); | 214 | up_read(&pci_bus_sem); |
206 | } | 215 | } |
207 | EXPORT_SYMBOL_GPL(pci_walk_bus); | ||
208 | 216 | ||
209 | EXPORT_SYMBOL(pci_bus_alloc_resource); | 217 | EXPORT_SYMBOL(pci_bus_alloc_resource); |
210 | EXPORT_SYMBOL_GPL(pci_bus_add_device); | 218 | EXPORT_SYMBOL_GPL(pci_bus_add_device); |