diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:20:31 -0700 |
---|---|---|
committer | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:20:31 -0700 |
commit | 3e9c7e877487a93a45dfb29d7987273bbece846b (patch) | |
tree | a124863d6c0de1b74e3865148c388e7e177d9eab | |
parent | af905bbfa62a9577b163005344a3c1a671424ca8 (diff) | |
download | linux-yinghai-3e9c7e877487a93a45dfb29d7987273bbece846b.tar.gz |
PCI: Use for_each_res with xen pci
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r-- | drivers/pci/xen-pcifront.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index d6cc62cb4cf746..09707dcaa2080a 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -394,9 +394,7 @@ static int pcifront_claim_resource(struct pci_dev *dev, void *data) int i; struct resource *r; - for (i = 0; i < PCI_NUM_RESOURCES; i++) { - r = &dev->resource[i]; - + for_each_pci_resource(dev, r, i, PCI_ALL_RES) { if (!r->parent && r->start && r->flags) { dev_info(&pdev->xdev->dev, "claiming resource %s/%d\n", pci_name(dev), i); |