提交 ad9f6713 编写于 作者: A Adrian Bunk 提交者: Jeff Garzik

[PATCH] drivers/net/tlan.c: #ifdef CONFIG_PCI the PCI specific code

drivers/net/tlan.c compiles with CONFIG_PCI=n only with a warning and
due to the dead code elimination of gcc.

Additionally, this fixes the only compile error I found with
CONFIG_PCI=n and the gcc -Werror-implicit-function-declaration
flag on i386.
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 22fe472c
......@@ -536,6 +536,7 @@ static int __devinit TLan_probe1(struct pci_dev *pdev,
u16 device_id;
int reg, rc = -ENODEV;
#ifdef CONFIG_PCI
if (pdev) {
rc = pci_enable_device(pdev);
if (rc)
......@@ -547,6 +548,7 @@ static int __devinit TLan_probe1(struct pci_dev *pdev,
goto err_out;
}
}
#endif /* CONFIG_PCI */
dev = alloc_etherdev(sizeof(TLanPrivateInfo));
if (dev == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册