提交 6f5bec19 编写于 作者: M Michael Opdenacker 提交者: David S. Miller

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: NMichael Opdenacker <michael@free-electrons.com>
Acked-by: NFlorian Fainelli <florian@openwrt.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ed10654
...@@ -1112,13 +1112,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev, ...@@ -1112,13 +1112,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
} }
/* IO Size check */ /* 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"); printk(KERN_ERR DRV_NAME ": Insufficient PCI resources, aborting\n");
err = -EIO; err = -EIO;
goto err_out; 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); pci_set_master(pdev);
dev = alloc_etherdev(sizeof(struct r6040_private)); dev = alloc_etherdev(sizeof(struct r6040_private));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册