Lines Matching refs:tmpl
74 struct crypto_template *tmpl = container_of(w, struct crypto_template, in crypto_destroy_instance_workfn() local
81 hlist_for_each_entry_safe(inst, n, &tmpl->dead, list) { in crypto_destroy_instance_workfn()
98 struct crypto_template *tmpl = inst->tmpl; in crypto_destroy_instance() local
101 schedule_work(&tmpl->free_work); in crypto_destroy_instance()
140 struct crypto_template *tmpl = inst->tmpl; in crypto_remove_instance() local
147 if (!tmpl) in crypto_remove_instance()
152 hlist_add_head(&inst->list, &tmpl->dead); in crypto_remove_instance()
537 int crypto_register_template(struct crypto_template *tmpl) in crypto_register_template() argument
542 INIT_WORK(&tmpl->free_work, crypto_destroy_instance_workfn); in crypto_register_template()
546 crypto_check_module_sig(tmpl->module); in crypto_register_template()
549 if (q == tmpl) in crypto_register_template()
553 list_add(&tmpl->list, &crypto_template_list); in crypto_register_template()
579 void crypto_unregister_template(struct crypto_template *tmpl) in crypto_unregister_template() argument
588 BUG_ON(list_empty(&tmpl->list)); in crypto_unregister_template()
589 list_del_init(&tmpl->list); in crypto_unregister_template()
591 list = &tmpl->instances; in crypto_unregister_template()
606 flush_work(&tmpl->free_work); in crypto_unregister_template()
621 struct crypto_template *q, *tmpl = NULL; in __crypto_lookup_template() local
630 tmpl = q; in __crypto_lookup_template()
635 return tmpl; in __crypto_lookup_template()
645 int crypto_register_instance(struct crypto_template *tmpl, in crypto_register_instance() argument
658 inst->alg.cra_module = tmpl->module; in crypto_register_instance()
690 hlist_add_head(&inst->list, &tmpl->instances); in crypto_register_instance()
691 inst->tmpl = tmpl; in crypto_register_instance()