All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Eliminate MOD_ from wanrouter
@ 2003-07-18 20:35 Stephen Hemminger
  2003-07-20  4:48 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2003-07-18 20:35 UTC (permalink / raw)
  To: Nenad Corbic, David S. Miller; +Cc: netdev

Wan router register/unregister doesn't need MOD_INC/MOD_DEC because it
can't be unloaded as long as it's symbols are in use by the calling module.

Patch against 2.6.0-test1

diff -Nru a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
--- a/net/wanrouter/wanmain.c	Fri Jul 18 13:20:48 2003
+++ b/net/wanrouter/wanmain.c	Fri Jul 18 13:20:48 2003
@@ -305,7 +305,6 @@
 	wandev->dev  = NULL;
 	wandev->next = wanrouter_router_devlist;
 	wanrouter_router_devlist = wandev;
-        MOD_INC_USE_COUNT;	/* prevent module from unloading */
 	return 0;
 }
 
@@ -350,7 +349,6 @@
 		wanrouter_router_devlist = wandev->next;
 
 	wanrouter_proc_delete(wandev);
-        MOD_DEC_USE_COUNT;
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-20  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18 20:35 [PATCH] Eliminate MOD_ from wanrouter Stephen Hemminger
2003-07-20  4:48 ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.