From 5b3d56256f7d9950cffb5f0c097f6f9d7a25dc76 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Tue, 7 Jul 2009 12:30:33 +0800 Subject: [PATCH] --- yaml --- r: 157943 b: refs/heads/master c: f2ac72e8268d9559c3114d5a22679f91f80a2238 h: refs/heads/master i: 157941: f398a7d8a6ac8b22f83d1b936eb69eac0fa478bf 157939: f57f9f2f35e0b04cfddfe4ab41f886e85a458a0d 157935: 5b7b2912258a800aa42a7a495b1c23b79f42f0c0 v: v3 --- [refs] | 2 +- trunk/crypto/algboss.c | 5 +++++ trunk/include/crypto/algapi.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2483295adac9..9143b71ef87c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fd09d7facb7cf3a884979eb5f843338ce1ce9b43 +refs/heads/master: f2ac72e8268d9559c3114d5a22679f91f80a2238 diff --git a/trunk/crypto/algboss.c b/trunk/crypto/algboss.c index 9908dd830c26..412241ce4cfa 100644 --- a/trunk/crypto/algboss.c +++ b/trunk/crypto/algboss.c @@ -68,6 +68,11 @@ static int cryptomgr_probe(void *data) goto err; do { + if (tmpl->create) { + err = tmpl->create(tmpl, param->tb); + continue; + } + inst = tmpl->alloc(param->tb); if (IS_ERR(inst)) err = PTR_ERR(inst); diff --git a/trunk/include/crypto/algapi.h b/trunk/include/crypto/algapi.h index 010545436efa..ce010a346420 100644 --- a/trunk/include/crypto/algapi.h +++ b/trunk/include/crypto/algapi.h @@ -52,6 +52,7 @@ struct crypto_template { struct crypto_instance *(*alloc)(struct rtattr **tb); void (*free)(struct crypto_instance *inst); + int (*create)(struct crypto_template *tmpl, struct rtattr **tb); char name[CRYPTO_MAX_ALG_NAME]; };