Lines Matching refs:tmpl
75 struct crypto_template *tmpl = inst->tmpl; in crypto_destroy_instance() local
77 tmpl->free(inst); in crypto_destroy_instance()
78 crypto_tmpl_put(tmpl); in crypto_destroy_instance()
107 struct crypto_template *tmpl = inst->tmpl; in crypto_remove_instance() local
116 if (!tmpl || !crypto_tmpl_get(tmpl)) in crypto_remove_instance()
438 int crypto_register_template(struct crypto_template *tmpl) in crypto_register_template() argument
445 crypto_check_module_sig(tmpl->module); in crypto_register_template()
448 if (q == tmpl) in crypto_register_template()
452 list_add(&tmpl->list, &crypto_template_list); in crypto_register_template()
453 crypto_notify(CRYPTO_MSG_TMPL_REGISTER, tmpl); in crypto_register_template()
461 void crypto_unregister_template(struct crypto_template *tmpl) in crypto_unregister_template() argument
470 BUG_ON(list_empty(&tmpl->list)); in crypto_unregister_template()
471 list_del_init(&tmpl->list); in crypto_unregister_template()
473 list = &tmpl->instances; in crypto_unregister_template()
480 crypto_notify(CRYPTO_MSG_TMPL_UNREGISTER, tmpl); in crypto_unregister_template()
486 tmpl->free(inst); in crypto_unregister_template()
494 struct crypto_template *q, *tmpl = NULL; in __crypto_lookup_template() local
503 tmpl = q; in __crypto_lookup_template()
508 return tmpl; in __crypto_lookup_template()
518 int crypto_register_instance(struct crypto_template *tmpl, in crypto_register_instance() argument
528 inst->alg.cra_module = tmpl->module; in crypto_register_instance()
540 hlist_add_head(&inst->list, &tmpl->instances); in crypto_register_instance()
541 inst->tmpl = tmpl; in crypto_register_instance()