diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-07 12:30:33 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-07 12:30:33 +0800 |
commit | f2ac72e8268d9559c3114d5a22679f91f80a2238 (patch) | |
tree | e52b3b65b62b48f8a77c9a522d9e55f04bcf6259 /crypto/algboss.c | |
parent | fd09d7facb7cf3a884979eb5f843338ce1ce9b43 (diff) | |
download | kernel_goldelico_gta04-f2ac72e8268d9559c3114d5a22679f91f80a2238.zip kernel_goldelico_gta04-f2ac72e8268d9559c3114d5a22679f91f80a2238.tar.gz kernel_goldelico_gta04-f2ac72e8268d9559c3114d5a22679f91f80a2238.tar.bz2 |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c index 9908dd8..412241c 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); |