diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2013-07-31 16:47:02 +0800 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-14 14:57:29 +1000 |
commit | 2f1ec02ea162ad18556c35a00c6220fc613f26ce (patch) | |
tree | bc43d50e7a8ab630302a3f3eb4dc4976b18132ba /arch/powerpc/platforms | |
parent | f1b7cc3ec1ed9fe684872b248b166280650c4976 (diff) | |
download | blackbird-op-linux-2f1ec02ea162ad18556c35a00c6220fc613f26ce.tar.gz blackbird-op-linux-2f1ec02ea162ad18556c35a00c6220fc613f26ce.zip |
powerpc/powernv: Check primary PHB through ID
The index of one specific PCI controller (struct pci_controller::
global_number) can tell that it's primary one or not. So we needn't
additional variable for that and just remove it.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index f472228148cc..829047baa4b2 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1104,7 +1104,6 @@ void __init pnv_pci_init_ioda_phb(struct device_node *np, u64 hub_id, int ioda_type) { struct pci_controller *hose; - static int primary = 1; struct pnv_phb *phb; unsigned long size, m32map_off, iomap_off, pemap_off; const u64 *prop64; @@ -1164,8 +1163,7 @@ void __init pnv_pci_init_ioda_phb(struct device_node *np, phb->model = PNV_PHB_MODEL_UNKNOWN; /* Parse 32-bit and IO ranges (if any) */ - pci_process_bridge_OF_ranges(phb->hose, np, primary); - primary = 0; + pci_process_bridge_OF_ranges(hose, np, !hose->global_number); /* Get registers */ phb->regs = of_iomap(np, 0); |