aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-09-17 22:20:28 -0700
committerYinghai Lu <yinghai@kernel.org>2012-09-17 22:20:28 -0700
commit53ecd08a5627922fe22125a9ef12bca89bff7b6a (patch)
tree516b6566fcb3789ceee11d3ab132b553d77d0ed5
parent4146f93faf7968a161a495b29b785cbd263801cd (diff)
downloadlinux-yinghai-53ecd08a5627922fe22125a9ef12bca89bff7b6a.tar.gz
x86, PCI: Use for_each_res with pci_allocate_bridge_resources
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r--arch/x86/pci/i386.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index e0b7f306b383c..8be132ad0b8c5 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -206,8 +206,7 @@ static void pcibios_allocate_bridge_resources(struct pci_dev *dev)
int idx;
struct resource *r;
- for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
- r = &dev->resource[idx];
+ for_each_pci_resource(dev, r, idx, PCI_BRIDGE_RES) {
if (!r->flags)
continue;
if (!r->start || pci_claim_resource(dev, idx) < 0) {