netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Minor code cleanup in drivers/net/r6040.c
@ 2009-06-25  7:05 Michael Opdenacker
  2009-06-25  8:18 ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Opdenacker @ 2009-06-25  7:05 UTC (permalink / raw)
  To: florian, davem, netdev, linux-kernel; +Cc: Michael Opdenacker

 Replaced '0' by 'bar' in the probe function.
 The 'bar' variable was already set to '0' and is already
 used in pci_iomap(). This is cleaner and improves code
 consistency.

Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
---
 drivers/net/r6040.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index ed63d23..b3197e9 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -1112,13 +1112,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
 	}
 
 	/* IO Size check */
-	if (pci_resource_len(pdev, 0) < io_size) {
+	if (pci_resource_len(pdev, bar) < io_size) {
 		printk(KERN_ERR DRV_NAME ": Insufficient PCI resources, aborting\n");
 		err = -EIO;
 		goto err_out;
 	}
 
-	pioaddr = pci_resource_start(pdev, 0);	/* IO map base address */
+	pioaddr = pci_resource_start(pdev, bar);	/* IO map base address */
 	pci_set_master(pdev);
 
 	dev = alloc_etherdev(sizeof(struct r6040_private));
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-06  2:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-25  7:05 [PATCH 1/1] Minor code cleanup in drivers/net/r6040.c Michael Opdenacker
2009-06-25  8:18 ` Florian Fainelli
2009-07-06  2:48   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).