Commit 295f9d0b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

stmmac: pci: use defined constant instead of magic number

The last standard PCI resource is defined as PCI_STD_RESOURCE_END. Thus, we
could use it instead of plain integer.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 915af656
...@@ -90,7 +90,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev, ...@@ -90,7 +90,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
} }
/* Get the base address of device */ /* Get the base address of device */
for (i = 0; i <= 5; i++) { for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
if (pci_resource_len(pdev, i) == 0) if (pci_resource_len(pdev, i) == 0)
continue; continue;
addr = pci_iomap(pdev, i, 0); addr = pci_iomap(pdev, i, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment