Change the semantics of this call to return the max reserved bus number instead of just the max assigned bus number.
Unified · Split
| @@ -19,7 +19,6 @@ · 18 unmodified lines | ||
| 19 | 19 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ |
| 20 | 20 | #include "pci.h" |
| 21 | 21 | |
| 22 | −#if 0 | |
| 23 | 22 | |
| 24 | 23 | /** |
| 25 | 24 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children |
| @@ -34,7 +33,7 @@ pci_bus_max_busnr(struct pci_bus* bus) · 8 unmodified lines | ||
| 34 | 33 | struct list_head *tmp; |
| 35 | 34 | unsigned char max, n; |
| 36 | 35 | |
| 37 | − max = bus->number; | |
| 36 | + max = bus->subordinate; | |
| 38 | 37 | list_for_each(tmp, &bus->children) { |
| 39 | 38 | n = pci_bus_max_busnr(pci_bus_b(tmp)); |
| 40 | 39 | if(n > max) |
| @@ -42,7 +41,9 @@ pci_bus_max_busnr(struct pci_bus* bus) · 1 unmodified line | ||
| 42 | 41 | } |
| 43 | 42 | return max; |
| 44 | 43 | } |
| 44 | +EXPORT_SYMBOL_GPL(pci_bus_max_busnr); | |
| 45 | 45 | |
| 46 | +#if 0 | |
| 46 | 47 | /** |
| 47 | 48 | * pci_max_busnr - returns maximum PCI bus number |
| 48 | 49 | * |
| @@ -516,6 +516,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass · 515 unmodified lines | ||
| 516 | 516 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), |
| 517 | 517 | void *userdata); |
| 518 | 518 | int pci_cfg_space_size(struct pci_dev *dev); |
| 519 | +unsigned char pci_bus_max_busnr(struct pci_bus* bus); | |
| 519 | 520 | |
| 520 | 521 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
| 521 | 522 | |