From: Michael Opdenacker Date: Wed, 24 Jun 2009 21:05:09 +0000 (+0000) Subject: Minor code cleanup in drivers/net/r6040.c X-Git-Tag: upstream/snapshot3+hdmi~17671^2~861 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f5bec195839dba3ca0ab8a7a53861e679109c0b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Minor code cleanup in drivers/net/r6040.c 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 Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- 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));