@@ -1488,9 +1488,9 @@ static inline struct pci_dev *pci_dev_get(struct pci_dev *dev)
/* these helpers provide future and backwards compatibility
* for accessing popular PCI BAR info */
-#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
-#define pci_resource_end(dev, bar) ((dev)->resource[(bar)].end)
-#define pci_resource_flags(dev, bar) ((dev)->resource[(bar)].flags)
+#define pci_resource_start(dev, bar) (pci_dev_resource_n(dev, (bar))->start)
+#define pci_resource_end(dev, bar) (pci_dev_resource_n(dev, (bar))->end)
+#define pci_resource_flags(dev, bar) (pci_dev_resource_n(dev, (bar))->flags)
#define pci_resource_len(dev,bar) \
((pci_resource_start((dev), (bar)) == 0 && \
pci_resource_end((dev), (bar)) == \
Now pci_resource_start is using dev->resource[n] directly. Replace it with pci_dev_resource[n] to prepare for addon resource support. Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- include/linux/pci.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)