Lines Matching refs:alg
974 struct crypto_alg *alg = tfm->__crt_alg; in crypto4xx_alg_init() local
975 struct crypto4xx_alg *amcc_alg = crypto_alg_to_crypto4xx_alg(alg); in crypto4xx_alg_init()
985 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { in crypto4xx_alg_init()
1010 struct crypto4xx_alg *alg; in crypto4xx_register_alg() local
1015 alg = kzalloc(sizeof(struct crypto4xx_alg), GFP_KERNEL); in crypto4xx_register_alg()
1016 if (!alg) in crypto4xx_register_alg()
1019 alg->alg = crypto_alg[i]; in crypto4xx_register_alg()
1020 alg->dev = sec_dev; in crypto4xx_register_alg()
1022 switch (alg->alg.type) { in crypto4xx_register_alg()
1024 rc = crypto_register_ahash(&alg->alg.u.hash); in crypto4xx_register_alg()
1028 rc = crypto_register_alg(&alg->alg.u.cipher); in crypto4xx_register_alg()
1033 list_del(&alg->entry); in crypto4xx_register_alg()
1034 kfree(alg); in crypto4xx_register_alg()
1036 list_add_tail(&alg->entry, &sec_dev->alg_list); in crypto4xx_register_alg()
1045 struct crypto4xx_alg *alg, *tmp; in crypto4xx_unregister_alg() local
1047 list_for_each_entry_safe(alg, tmp, &sec_dev->alg_list, entry) { in crypto4xx_unregister_alg()
1048 list_del(&alg->entry); in crypto4xx_unregister_alg()
1049 switch (alg->alg.type) { in crypto4xx_unregister_alg()
1051 crypto_unregister_ahash(&alg->alg.u.hash); in crypto4xx_unregister_alg()
1055 crypto_unregister_alg(&alg->alg.u.cipher); in crypto4xx_unregister_alg()
1057 kfree(alg); in crypto4xx_unregister_alg()