s390/crypto: add cpu feature modaliases for crypto modules
Use the module_cpu_feature_match() module init function to add an module alias based on required CPU features. The modules are automatically loaded on hardware that supports the required CPU features. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
8f00b3e28f
commit
d05377c12a
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/cpufeature.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/algapi.h>
|
||||
#include <crypto/des.h>
|
||||
@@ -616,7 +617,7 @@ static void __exit des_s390_exit(void)
|
||||
crypto_unregister_alg(&des_alg);
|
||||
}
|
||||
|
||||
module_init(des_s390_init);
|
||||
module_cpu_feature_match(MSA, des_s390_init);
|
||||
module_exit(des_s390_exit);
|
||||
|
||||
MODULE_ALIAS_CRYPTO("des");
|
||||
|
Reference in New Issue
Block a user