diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 17:53:16 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 18:58:29 +0800 |
commit | d06854f0243d91badabaab14503f7f3bb770061d (patch) | |
tree | 252603fecb02a8cc4933b0e582444ff7cb504018 /crypto/algapi.c | |
parent | 942969992d86330c9700e2cd9afe8a6bea42df78 (diff) | |
download | linux-3.10-d06854f0243d91badabaab14503f7f3bb770061d.tar.gz linux-3.10-d06854f0243d91badabaab14503f7f3bb770061d.tar.bz2 linux-3.10-d06854f0243d91badabaab14503f7f3bb770061d.zip |
crypto: api - Add crypto_attr_alg2 helper
This patch adds the helper crypto_attr_alg2 which is similar to
crypto_attr_alg but takes an extra frontend argument. This is
intended to be used by new style algorithm types such as shash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 17a5fff8f77..2154815201a 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -644,7 +644,9 @@ const char *crypto_attr_alg_name(struct rtattr *rta) } EXPORT_SYMBOL_GPL(crypto_attr_alg_name); -struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask) +struct crypto_alg *crypto_attr_alg2(struct rtattr *rta, + const struct crypto_type *frontend, + u32 type, u32 mask) { const char *name; int err; @@ -654,9 +656,9 @@ struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask) if (IS_ERR(name)) return ERR_PTR(err); - return crypto_alg_mod_lookup(name, type, mask); + return crypto_find_alg(name, frontend, type, mask); } -EXPORT_SYMBOL_GPL(crypto_attr_alg); +EXPORT_SYMBOL_GPL(crypto_attr_alg2); int crypto_attr_u32(struct rtattr *rta, u32 *num) { |