|
@@ -551,17 +551,13 @@ err:
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(crypto_register_instance);
|
|
EXPORT_SYMBOL_GPL(crypto_register_instance);
|
|
|
|
|
|
-int crypto_unregister_instance(struct crypto_alg *alg)
|
|
|
|
|
|
+int crypto_unregister_instance(struct crypto_instance *inst)
|
|
{
|
|
{
|
|
- struct crypto_instance *inst = (void *)alg;
|
|
|
|
LIST_HEAD(list);
|
|
LIST_HEAD(list);
|
|
|
|
|
|
- if (!(alg->cra_flags & CRYPTO_ALG_INSTANCE))
|
|
|
|
- return -EINVAL;
|
|
|
|
-
|
|
|
|
down_write(&crypto_alg_sem);
|
|
down_write(&crypto_alg_sem);
|
|
|
|
|
|
- crypto_remove_spawns(alg, &list, NULL);
|
|
|
|
|
|
+ crypto_remove_spawns(&inst->alg, &list, NULL);
|
|
crypto_remove_instance(inst, &list);
|
|
crypto_remove_instance(inst, &list);
|
|
|
|
|
|
up_write(&crypto_alg_sem);
|
|
up_write(&crypto_alg_sem);
|