diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:20:30 -0700 |
---|---|---|
committer | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:20:30 -0700 |
commit | bdb488a1a27f8465ef45e5274907751b1d27bea5 (patch) | |
tree | 23d3dfdd621d893ad95b517a179914958bdd029f | |
parent | df1ed825e56240ec3ce659b77731f9b4fd1e6daa (diff) | |
download | linux-yinghai-bdb488a1a27f8465ef45e5274907751b1d27bea5.tar.gz |
PCI: Use for_each_res with noassign_bars
Replace those open code, and make code more readable.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r-- | arch/x86/pci/common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 720e973fc34a3..55837ce454a66 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -136,8 +136,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) * resource so the kernel doesn't attmept to assign * it later on in pci_assign_unassigned_resources */ - for (bar = 0; bar <= PCI_STD_RESOURCE_END; bar++) { - bar_r = &dev->resource[bar]; + for_each_pci_resource(dev, bar_r, bar, PCI_NOIOV_RES & ~PCI_BRIDGE_RES & ~PCI_ROM_RES) { if (bar_r->start == 0 && bar_r->end != 0) { bar_r->flags = 0; bar_r->end = 0; |