Lines Matching refs:alg
989 struct crypto_alg *alg = tfm->__crt_alg;
990 struct crypto4xx_alg *amcc_alg = crypto_alg_to_crypto4xx_alg(alg);
1000 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
1025 struct crypto4xx_alg *alg;
1030 alg = kzalloc(sizeof(struct crypto4xx_alg), GFP_KERNEL);
1031 if (!alg)
1034 alg->alg = crypto_alg[i];
1035 alg->dev = sec_dev;
1037 switch (alg->alg.type) {
1039 rc = crypto_register_ahash(&alg->alg.u.hash);
1043 rc = crypto_register_alg(&alg->alg.u.cipher);
1048 list_del(&alg->entry);
1049 kfree(alg);
1051 list_add_tail(&alg->entry, &sec_dev->alg_list);
1060 struct crypto4xx_alg *alg, *tmp;
1062 list_for_each_entry_safe(alg, tmp, &sec_dev->alg_list, entry) {
1063 list_del(&alg->entry);
1064 switch (alg->alg.type) {
1066 crypto_unregister_ahash(&alg->alg.u.hash);
1070 crypto_unregister_alg(&alg->alg.u.cipher);
1072 kfree(alg);