Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git] / arch / arm64 / crypto / ghash-ce-glue.c
index fcd458c83bc185ece1dd0e9e860a93105e7c59a1..b39ed99b06fb760e468fa97b0e59c923b29b51d4 100644 (file)
@@ -707,10 +707,10 @@ static int __init ghash_ce_mod_init(void)
 {
        int ret;
 
-       if (!(elf_hwcap & HWCAP_ASIMD))
+       if (!cpu_have_named_feature(ASIMD))
                return -ENODEV;
 
-       if (elf_hwcap & HWCAP_PMULL)
+       if (cpu_have_named_feature(PMULL))
                ret = crypto_register_shashes(ghash_alg,
                                              ARRAY_SIZE(ghash_alg));
        else
@@ -720,7 +720,7 @@ static int __init ghash_ce_mod_init(void)
        if (ret)
                return ret;
 
-       if (elf_hwcap & HWCAP_PMULL) {
+       if (cpu_have_named_feature(PMULL)) {
                ret = crypto_register_aead(&gcm_aes_alg);
                if (ret)
                        crypto_unregister_shashes(ghash_alg,
@@ -731,7 +731,7 @@ static int __init ghash_ce_mod_init(void)
 
 static void __exit ghash_ce_mod_exit(void)
 {
-       if (elf_hwcap & HWCAP_PMULL)
+       if (cpu_have_named_feature(PMULL))
                crypto_unregister_shashes(ghash_alg, ARRAY_SIZE(ghash_alg));
        else
                crypto_unregister_shash(ghash_alg);