diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-11-05 12:27:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-06 14:38:57 -0500 |
commit | 295f9d0bc3975e9885c73bfd82cdff9b739d2001 (patch) | |
tree | 75daf996e5bc0fe936844ed68d10333b1423f1ad /drivers/net/ethernet/stmicro | |
parent | 915af65619244eaf0644aad22e9299c7da303a8e (diff) | |
download | op-kernel-dev-295f9d0bc3975e9885c73bfd82cdff9b739d2001.zip op-kernel-dev-295f9d0bc3975e9885c73bfd82cdff9b739d2001.tar.gz |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index e17a970..e45794d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -90,7 +90,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev, } /* 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) continue; addr = pci_iomap(pdev, i, 0); |