Lines Matching refs:alg
992 struct crypto_alg *alg = tfm->__crt_alg; in crypto4xx_alg_init() local
993 struct crypto4xx_alg *amcc_alg = crypto_alg_to_crypto4xx_alg(alg); in crypto4xx_alg_init()
1003 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { in crypto4xx_alg_init()
1028 struct crypto4xx_alg *alg; in crypto4xx_register_alg() local
1033 alg = kzalloc(sizeof(struct crypto4xx_alg), GFP_KERNEL); in crypto4xx_register_alg()
1034 if (!alg) in crypto4xx_register_alg()
1037 alg->alg = crypto_alg[i]; in crypto4xx_register_alg()
1038 alg->dev = sec_dev; in crypto4xx_register_alg()
1040 switch (alg->alg.type) { in crypto4xx_register_alg()
1042 rc = crypto_register_ahash(&alg->alg.u.hash); in crypto4xx_register_alg()
1046 rc = crypto_register_alg(&alg->alg.u.cipher); in crypto4xx_register_alg()
1051 list_del(&alg->entry); in crypto4xx_register_alg()
1052 kfree(alg); in crypto4xx_register_alg()
1054 list_add_tail(&alg->entry, &sec_dev->alg_list); in crypto4xx_register_alg()
1063 struct crypto4xx_alg *alg, *tmp; in crypto4xx_unregister_alg() local
1065 list_for_each_entry_safe(alg, tmp, &sec_dev->alg_list, entry) { in crypto4xx_unregister_alg()
1066 list_del(&alg->entry); in crypto4xx_unregister_alg()
1067 switch (alg->alg.type) { in crypto4xx_unregister_alg()
1069 crypto_unregister_ahash(&alg->alg.u.hash); in crypto4xx_unregister_alg()
1073 crypto_unregister_alg(&alg->alg.u.cipher); in crypto4xx_unregister_alg()
1075 kfree(alg); in crypto4xx_unregister_alg()