aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lance.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda@ilport.com.ua>2006-01-06 01:45:47 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-09 10:54:48 -0500
commit64916f1ebe93592153c72bcdb189a31e4d40049a (patch)
treeb525bb438c142edb5395125cdb0163efa816cc76 /drivers/net/lance.c
parentfa45459e5e4507402350f1cdaf44b7455602770c (diff)
[PATCH] fix a few "warning: 'cleanup_card' defined but not used"
These warnings are emitted if non-modular network drivers are built. Fixes just move cleanup_card() definitions into #ifdef MODULE region. /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/wd.c:131: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/3c503.c:152: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/ne.c:216: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/hp.c:106: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/hp-plus.c:142: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/smc-ultra.c:172: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/e2100.c:144: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/es3210.c:159: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/lne390.c:149: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/lance.c:313: warning: 'cleanup_card' defined but not used /.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/ac3200.c:127: warning: 'cleanup_card' defined but not used Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/lance.c')
-rw-r--r--drivers/net/lance.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index 1d75ca0bb939..d1d714faa6ce 100644
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -309,17 +309,6 @@ static void lance_tx_timeout (struct net_device *dev);
309 309
310 310
311 311
312static void cleanup_card(struct net_device *dev)
313{
314 struct lance_private *lp = dev->priv;
315 if (dev->dma != 4)
316 free_dma(dev->dma);
317 release_region(dev->base_addr, LANCE_TOTAL_SIZE);
318 kfree(lp->tx_bounce_buffs);
319 kfree((void*)lp->rx_buffs);
320 kfree(lp);
321}
322
323#ifdef MODULE 312#ifdef MODULE
324#define MAX_CARDS 8 /* Max number of interfaces (cards) per module */ 313#define MAX_CARDS 8 /* Max number of interfaces (cards) per module */
325 314
@@ -367,6 +356,17 @@ int init_module(void)
367 return -ENXIO; 356 return -ENXIO;
368} 357}
369 358
359static void cleanup_card(struct net_device *dev)
360{
361 struct lance_private *lp = dev->priv;
362 if (dev->dma != 4)
363 free_dma(dev->dma);
364 release_region(dev->base_addr, LANCE_TOTAL_SIZE);
365 kfree(lp->tx_bounce_buffs);
366 kfree((void*)lp->rx_buffs);
367 kfree(lp);
368}
369
370void cleanup_module(void) 370void cleanup_module(void)
371{ 371{
372 int this_dev; 372 int this_dev;