Skip to contentSkip to conversation

fix tlan.c for !PCI

PATCH In review Adrian Bunk 2 participants 2 messages May 12, 2004 – May 15, 2004 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix tlan.c for !PCI

I got the following compile error in 2.6.6-mm1 (but it's not specific to -mm) with CONFIG_PCI=n:

<-- snip -->

...
CC drivers/net/tlan.o
drivers/net/tlan.c: In function `tlan_remove_one':
drivers/net/tlan.c:449: warning: implicit declaration of function `pci_release_regions'
...
LD .tmp_vmlinux1
drivers/built-in.o(.text+0x135183): In function `tlan_remove_one':
: undefined reference to pci_release_regions' drivers/built-in.o(.text+0x13541f): In function TLan_probe1':
: undefined reference to `pci_release_regions'
make: *** [.tmp_vmlinux1] Error 1

<-- snip -->

The patch below fixes this issue.

Please apply
Adrian

drivers/net/tlan.c renamed from drivers/net/tlan.c.old +4 -0
@@ -446,7 +446,9 @@
 		pci_free_consistent(priv->pciDev, priv->dmaSize, priv->dmaStorage, priv->dmaStorageDMA );
 	}
 
+#ifdef CONFIG_PCI
 	pci_release_regions(pdev);
+#endif
 	
 	free_netdev( dev );
 		
@@ -673,8 +675,10 @@
 err_out_free_dev:
 	free_netdev(dev);
 err_out_regions:
+#ifdef CONFIG_PCI
 	if (pdev)
 		pci_release_regions(pdev);
+#endif
 err_out:
 	if (pdev)
 		pci_disable_device(pdev);
#1 lore raw
Quoted 2 lines · Adrian Bunk

I got the following compile error in 2.6.6-mm1 (but it's not specific to -mm) with CONFIG_PCI=n:

<snip/>

Quoted 4 lines

The patch below fixes this issue.

Please apply
Adrian

<snip/>

Thanks for the patch, Adrian.
I will get to this as soon as my day job allows.
Sam

Signature · 2 lines
   Sam Chessman                                         chessman (a) tux.org
    First do what's necessary, then what's possible, finally the impossible.