This commit was manufactured by cvs2svn to create branch
[linux-2.6.git] / crypto / api.c
index 6f0e625..24fd60e 100644 (file)
@@ -117,12 +117,19 @@ static void crypto_exit_ops(struct crypto_tfm *tfm)
        }
 }
 
-struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
+struct crypto_tfm *crypto_alloc_tfm2(const char *name, u32 flags,
+                                    int nomodload)
 {
        struct crypto_tfm *tfm = NULL;
        struct crypto_alg *alg;
 
-       alg = crypto_alg_mod_lookup(name);
+       if (!nomodload) {
+               alg = crypto_alg_mod_lookup(name);
+       }
+       else {
+               alg = crypto_alg_lookup(name);
+       }
+
        if (alg == NULL)
                goto out;
        
@@ -153,6 +160,11 @@ out:
        return tfm;
 }
 
+struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
+{
+       return crypto_alloc_tfm2(name, flags, 0);
+}
+
 void crypto_free_tfm(struct crypto_tfm *tfm)
 {
        crypto_exit_ops(tfm);