sh: Fix fatal oops in copy_user_page() on sh4a (SH7780).
[powerpc.git] / crypto / api.c
index edaa843..2e84d4b 100644 (file)
@@ -482,3 +482,17 @@ int crypto_alg_available(const char *name, u32 flags)
 EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
 EXPORT_SYMBOL_GPL(crypto_free_tfm);
 EXPORT_SYMBOL_GPL(crypto_alg_available);
+
+int crypto_has_alg(const char *name, u32 type, u32 mask)
+{
+       int ret = 0;
+       struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask);
+       
+       if (!IS_ERR(alg)) {
+               crypto_mod_put(alg);
+               ret = 1;
+       }
+       
+       return ret;
+}
+EXPORT_SYMBOL_GPL(crypto_has_alg);