diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-08-14 08:35:06 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-08-14 08:35:05 -0700 |
| commit | 41155385a0a28dab926359f75a344a6183fd4195 (patch) | |
| tree | f66b3c8474e4a9525089eed7801110dfec109e10 /crypto/algapi.c | |
| parent | e04bed8a9977c8f66a3427690148ea8f6e81c559 (diff) | |
| parent | c2e09fadec5ce348e125150e66a9a32b4af44756 (diff) | |
Merge "Merge android-4.4.142 (8ec9fd8) into msm-4.4"
Diffstat (limited to 'crypto/algapi.c')
| -rw-r--r-- | crypto/algapi.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index eb58b73ca925..ac70fd5cd404 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -1001,6 +1001,21 @@ unsigned int crypto_alg_extsize(struct crypto_alg *alg) } EXPORT_SYMBOL_GPL(crypto_alg_extsize); +int crypto_type_has_alg(const char *name, const struct crypto_type *frontend, + u32 type, u32 mask) +{ + int ret = 0; + struct crypto_alg *alg = crypto_find_alg(name, frontend, type, mask); + + if (!IS_ERR(alg)) { + crypto_mod_put(alg); + ret = 1; + } + + return ret; +} +EXPORT_SYMBOL_GPL(crypto_type_has_alg); + static int __init crypto_algapi_init(void) { crypto_init_proc(); |
