Lines Matching refs:alg
994 struct crypto_alg *alg = tfm->__crt_alg; in crypto4xx_alg_init() local
995 struct crypto4xx_alg *amcc_alg = crypto_alg_to_crypto4xx_alg(alg); in crypto4xx_alg_init()
1005 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { in crypto4xx_alg_init()
1030 struct crypto4xx_alg *alg; in crypto4xx_register_alg() local
1035 alg = kzalloc(sizeof(struct crypto4xx_alg), GFP_KERNEL); in crypto4xx_register_alg()
1036 if (!alg) in crypto4xx_register_alg()
1039 alg->alg = crypto_alg[i]; in crypto4xx_register_alg()
1040 alg->dev = sec_dev; in crypto4xx_register_alg()
1042 switch (alg->alg.type) { in crypto4xx_register_alg()
1044 rc = crypto_register_ahash(&alg->alg.u.hash); in crypto4xx_register_alg()
1048 rc = crypto_register_alg(&alg->alg.u.cipher); in crypto4xx_register_alg()
1053 list_del(&alg->entry); in crypto4xx_register_alg()
1054 kfree(alg); in crypto4xx_register_alg()
1056 list_add_tail(&alg->entry, &sec_dev->alg_list); in crypto4xx_register_alg()
1065 struct crypto4xx_alg *alg, *tmp; in crypto4xx_unregister_alg() local
1067 list_for_each_entry_safe(alg, tmp, &sec_dev->alg_list, entry) { in crypto4xx_unregister_alg()
1068 list_del(&alg->entry); in crypto4xx_unregister_alg()
1069 switch (alg->alg.type) { in crypto4xx_unregister_alg()
1071 crypto_unregister_ahash(&alg->alg.u.hash); in crypto4xx_unregister_alg()
1075 crypto_unregister_alg(&alg->alg.u.cipher); in crypto4xx_unregister_alg()
1077 kfree(alg); in crypto4xx_unregister_alg()