diff options
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index c3cf1a69a47a..54dd4e33b5d6 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -22,8 +22,6 @@ | |||
22 | 22 | ||
23 | #include "internal.h" | 23 | #include "internal.h" |
24 | 24 | ||
25 | static void crypto_remove_final(struct list_head *list); | ||
26 | |||
27 | static LIST_HEAD(crypto_template_list); | 25 | static LIST_HEAD(crypto_template_list); |
28 | 26 | ||
29 | void crypto_larval_error(const char *name, u32 type, u32 mask) | 27 | void crypto_larval_error(const char *name, u32 type, u32 mask) |
@@ -129,9 +127,8 @@ static void crypto_remove_spawn(struct crypto_spawn *spawn, | |||
129 | BUG_ON(!list_empty(&inst->alg.cra_users)); | 127 | BUG_ON(!list_empty(&inst->alg.cra_users)); |
130 | } | 128 | } |
131 | 129 | ||
132 | static void crypto_remove_spawns(struct crypto_alg *alg, | 130 | void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, |
133 | struct list_head *list, | 131 | struct crypto_alg *nalg) |
134 | struct crypto_alg *nalg) | ||
135 | { | 132 | { |
136 | u32 new_type = (nalg ?: alg)->cra_flags; | 133 | u32 new_type = (nalg ?: alg)->cra_flags; |
137 | struct crypto_spawn *spawn, *n; | 134 | struct crypto_spawn *spawn, *n; |
@@ -177,6 +174,7 @@ static void crypto_remove_spawns(struct crypto_alg *alg, | |||
177 | crypto_remove_spawn(spawn, list); | 174 | crypto_remove_spawn(spawn, list); |
178 | } | 175 | } |
179 | } | 176 | } |
177 | EXPORT_SYMBOL_GPL(crypto_remove_spawns); | ||
180 | 178 | ||
181 | static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg) | 179 | static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg) |
182 | { | 180 | { |
@@ -321,7 +319,7 @@ unlock: | |||
321 | } | 319 | } |
322 | EXPORT_SYMBOL_GPL(crypto_alg_tested); | 320 | EXPORT_SYMBOL_GPL(crypto_alg_tested); |
323 | 321 | ||
324 | static void crypto_remove_final(struct list_head *list) | 322 | void crypto_remove_final(struct list_head *list) |
325 | { | 323 | { |
326 | struct crypto_alg *alg; | 324 | struct crypto_alg *alg; |
327 | struct crypto_alg *n; | 325 | struct crypto_alg *n; |
@@ -331,6 +329,7 @@ static void crypto_remove_final(struct list_head *list) | |||
331 | crypto_alg_put(alg); | 329 | crypto_alg_put(alg); |
332 | } | 330 | } |
333 | } | 331 | } |
332 | EXPORT_SYMBOL_GPL(crypto_remove_final); | ||
334 | 333 | ||
335 | static void crypto_wait_for_test(struct crypto_larval *larval) | 334 | static void crypto_wait_for_test(struct crypto_larval *larval) |
336 | { | 335 | { |
@@ -493,6 +492,7 @@ int crypto_register_instance(struct crypto_template *tmpl, | |||
493 | goto err; | 492 | goto err; |
494 | 493 | ||
495 | inst->alg.cra_module = tmpl->module; | 494 | inst->alg.cra_module = tmpl->module; |
495 | inst->alg.cra_flags |= CRYPTO_ALG_INSTANCE; | ||
496 | 496 | ||
497 | down_write(&crypto_alg_sem); | 497 | down_write(&crypto_alg_sem); |
498 | 498 | ||