diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:20:29 -0700 |
---|---|---|
committer | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:20:29 -0700 |
commit | aa4fc32dcc941f72157a07a54dcbec888de0a229 (patch) | |
tree | c0863214f3183626c3a740d998e1eb7bdf9b5743 | |
parent | 2ebf82f33e3518fa3901661b36aea1f32da5cc8d (diff) | |
download | linux-yinghai-aa4fc32dcc941f72157a07a54dcbec888de0a229.tar.gz |
PCI, pciehp: Use for_each_pci_dev_resource helper
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 13b2eaf7ba434..204d61f998d02 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -798,6 +798,7 @@ static inline void dbg_ctrl(struct controller *ctrl) int i; u16 reg16; struct pci_dev *pdev = ctrl->pcie->port; + struct resource *res; if (!pciehp_debug) return; @@ -813,11 +814,11 @@ static inline void dbg_ctrl(struct controller *ctrl) pdev->subsystem_vendor); ctrl_info(ctrl, " PCIe Cap offset : 0x%02x\n", pci_pcie_cap(pdev)); - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { + for_each_pci_resource(pdev, res, i, PCI_ALL_RES) { if (!pci_resource_len(pdev, i)) continue; ctrl_info(ctrl, " PCI resource [%d] : %pR\n", - i, &pdev->resource[i]); + i, res); } ctrl_info(ctrl, "Slot Capabilities : 0x%08x\n", ctrl->slot_cap); ctrl_info(ctrl, " Physical Slot Number : %d\n", PSN(ctrl)); |