Skip to content

Commit

Permalink
[PATCH] drivers/net/tlan.c: #ifdef CONFIG_PCI the PCI specific code
Browse files Browse the repository at this point in the history
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 <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Adrian Bunk authored and Jeff Garzik committed Feb 24, 2006
1 parent 22fe472 commit ad9f671
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/tlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down

0 comments on commit ad9f671

Please sign in to comment.