diff options
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 52b54f053be0..68f91a252595 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -133,7 +133,7 @@ int pci_bus_add_child(struct pci_bus *bus) | |||
133 | * | 133 | * |
134 | * Call hotplug for each new devices. | 134 | * Call hotplug for each new devices. |
135 | */ | 135 | */ |
136 | void pci_bus_add_devices(struct pci_bus *bus) | 136 | void pci_bus_add_devices(const struct pci_bus *bus) |
137 | { | 137 | { |
138 | struct pci_dev *dev; | 138 | struct pci_dev *dev; |
139 | struct pci_bus *child; | 139 | struct pci_bus *child; |
@@ -184,8 +184,10 @@ void pci_enable_bridges(struct pci_bus *bus) | |||
184 | 184 | ||
185 | list_for_each_entry(dev, &bus->devices, bus_list) { | 185 | list_for_each_entry(dev, &bus->devices, bus_list) { |
186 | if (dev->subordinate) { | 186 | if (dev->subordinate) { |
187 | retval = pci_enable_device(dev); | 187 | if (atomic_read(&dev->enable_cnt) == 0) { |
188 | pci_set_master(dev); | 188 | retval = pci_enable_device(dev); |
189 | pci_set_master(dev); | ||
190 | } | ||
189 | pci_enable_bridges(dev->subordinate); | 191 | pci_enable_bridges(dev->subordinate); |
190 | } | 192 | } |
191 | } | 193 | } |