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: Adrian Bunk <[EMAIL PROTECTED]>
---
drivers/net/tlan.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.16-rc1-mm3-full/drivers/net/tlan.c.old 2006-01-29
23:35:48.000000000 +0100
+++ linux-2.6.16-rc1-mm3-full/drivers/net/tlan.c 2006-01-29
23:36:49.000000000 +0100
@@ -533,23 +533,25 @@
struct net_device *dev;
TLanPrivateInfo *priv;
u8 pci_rev;
u16 device_id;
int reg, rc = -ENODEV;
+#ifdef CONFIG_PCI
if (pdev) {
rc = pci_enable_device(pdev);
if (rc)
return rc;
rc = pci_request_regions(pdev, TLanSignature);
if (rc) {
printk(KERN_ERR "TLAN: Could not reserve IO regions\n");
goto err_out;
}
}
+#endif /* CONFIG_PCI */
dev = alloc_etherdev(sizeof(TLanPrivateInfo));
if (dev == NULL) {
printk(KERN_ERR "TLAN: Could not allocate memory for
device.\n");
rc = -ENOMEM;
goto err_out_regions;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html