summaryrefslogtreecommitdiff
path: root/crypto/algboss.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-07 12:30:33 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-07 12:30:33 +0800
commitedd1f297df1f3e8bb211386f83d200a7de7b13dd (patch)
treea1f8d77189aacf7378762b7a7a3c03b83153199c /crypto/algboss.c
parenteb3bc74adaccd4e3d60e52ea1d6122f94b7c9818 (diff)
downloadlinux-crypto-edd1f297df1f3e8bb211386f83d200a7de7b13dd.tar.gz
linux-crypto-edd1f297df1f3e8bb211386f83d200a7de7b13dd.zip
crypto: api - Add new template create function
This patch introduces the template->create function intended to replace the existing alloc function. The intention is for create to handle the registration directly, whereas currently the caller of alloc has to handle the registration. This allows type-specific code to be run prior to registration. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r--crypto/algboss.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 9908dd83..412241ce 100644
--- a/crypto/algboss.c
+++ b/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);