diff --git a/include/linux/module.h b/include/linux/module.h index 3d988c18..812aa350 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -9,7 +9,7 @@ struct module; #define module_init(initfn) \ - __attribute__((constructor(109))) \ + __attribute__((constructor(120))) \ static void __call_##initfn(void) { BUG_ON(initfn()); } #if 0 diff --git a/linux/crypto/sha1_generic.c b/linux/crypto/sha1_generic.c index b0b9cd15..31b5d12e 100644 --- a/linux/crypto/sha1_generic.c +++ b/linux/crypto/sha1_generic.c @@ -78,15 +78,8 @@ static struct shash_alg alg = { } }; +__attribute__((constructor(110))) static int __init sha1_generic_mod_init(void) { return crypto_register_shash(&alg); } - -static void __exit sha1_generic_mod_fini(void) -{ - crypto_unregister_shash(&alg); -} - -module_init(sha1_generic_mod_init); -module_exit(sha1_generic_mod_fini);