diff options
-rw-r--r-- | crypto/algboss.c | 5 | ||||
-rw-r--r-- | include/crypto/algapi.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c index 9908dd830c26..412241ce4cfa 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c | |||
@@ -68,6 +68,11 @@ static int cryptomgr_probe(void *data) | |||
68 | goto err; | 68 | goto err; |
69 | 69 | ||
70 | do { | 70 | do { |
71 | if (tmpl->create) { | ||
72 | err = tmpl->create(tmpl, param->tb); | ||
73 | continue; | ||
74 | } | ||
75 | |||
71 | inst = tmpl->alloc(param->tb); | 76 | inst = tmpl->alloc(param->tb); |
72 | if (IS_ERR(inst)) | 77 | if (IS_ERR(inst)) |
73 | err = PTR_ERR(inst); | 78 | err = PTR_ERR(inst); |
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 010545436efa..ce010a346420 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
@@ -52,6 +52,7 @@ struct crypto_template { | |||
52 | 52 | ||
53 | struct crypto_instance *(*alloc)(struct rtattr **tb); | 53 | struct crypto_instance *(*alloc)(struct rtattr **tb); |
54 | void (*free)(struct crypto_instance *inst); | 54 | void (*free)(struct crypto_instance *inst); |
55 | int (*create)(struct crypto_template *tmpl, struct rtattr **tb); | ||
55 | 56 | ||
56 | char name[CRYPTO_MAX_ALG_NAME]; | 57 | char name[CRYPTO_MAX_ALG_NAME]; |
57 | }; | 58 | }; |