[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1332136129-14010-12-git-send-email-yinghai@kernel.org>
Date: Sun, 18 Mar 2012 22:48:34 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Jesse Barnes <jbarnes@...tuousgeek.org>, x86 <x86@...nel.org>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH -v2 11/26] PCI: Use for_each_pci_dev_resource pci_reassigndev
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
drivers/pci/pci.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 44b4835..5439033 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3718,8 +3718,7 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
command &= ~PCI_COMMAND_MEMORY;
pci_write_config_word(dev, PCI_COMMAND, command);
- for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
- r = &dev->resource[i];
+ for_each_pci_dev_nobridge_resource(dev, r, i) {
if (!(r->flags & IORESOURCE_MEM))
continue;
size = resource_size(r);
@@ -3738,8 +3737,7 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
*/
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE &&
(dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
- for (i = PCI_BRIDGE_RESOURCES; i < PCI_NUM_RESOURCES; i++) {
- r = &dev->resource[i];
+ for_each_pci_dev_bridge_resource(dev, r, i) {
if (!(r->flags & IORESOURCE_MEM))
continue;
r->end = resource_size(r) - 1;
--
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists