Skip to contentSkip to conversation

rfkill: Use subsys_initcall

PATCH In review Michael Buesch 2 participants 2 messages Oct 28, 2007 Rfkill

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rfkill: Use subsys_initcall

We must use subsys_initcall, because we must initialize before a driver calls rfkill_register().

net/rfkill/rfkill.c +1 -1
Index: wireless-2.6/net/rfkill/rfkill.c
===================================================================
@@ -449,5 +449,5 @@ static void __exit rfkill_exit(void)
 	class_unregister(&rfkill_class);
 }
 
-module_init(rfkill_init);
+subsys_initcall(rfkill_init);
 module_exit(rfkill_exit);
#1 lore raw
Quoted 4 lines · Michael Buesch

We must use subsys_initcall, because we must initialize before a driver calls rfkill_register().

Quoted 12 lines

Index: wireless-2.6/net/rfkill/rfkill.c
===================================================================

net/rfkill/rfkill.c +1 -1
@@ -449,5 +449,5 @@ static void __exit rfkill_exit(void)
 	class_unregister(&rfkill_class);
 }
 
-module_init(rfkill_init);
+subsys_initcall(rfkill_init);
 module_exit(rfkill_exit);