From: Daniel Walker Date: Wed, 7 Feb 2007 05:56:37 +0000 (-0800) Subject: Fix ATM initcall ordering. X-Git-Tag: v2.6.20.2~87 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=977e7e120593695d1a5ac66df5dbd44113ce49a8;p=karo-tx-linux.git Fix ATM initcall ordering. [ATM]: Fix for crash in adummy_init() This was reported by Ingo Molnar here, http://lkml.org/lkml/2006/12/18/119 The problem is that adummy_init() depends on atm_init() , but adummy_init() is called first. So I put atm_init() into subsys_initcall which seems appropriate, and it will still get module_init() if it becomes a module. Interesting to note that you could crash your system here if you just load the modules in the wrong order. Signed-off-by: Daniel Walker Signed-off-by: Andrew Morton Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/atm/common.c b/net/atm/common.c index fbabff494468..a2878e92c3ab 100644 --- a/net/atm/common.c +++ b/net/atm/common.c @@ -816,7 +816,8 @@ static void __exit atm_exit(void) proto_unregister(&vcc_proto); } -module_init(atm_init); +subsys_initcall(atm_init); + module_exit(atm_exit); MODULE_LICENSE("GPL");