From: Herbert Xu Date: Tue, 26 Jan 2016 14:14:36 +0000 (+0800) Subject: crypto: skcipher - Add helper to retrieve driver name X-Git-Tag: v5.15~13898^2~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2d382a4f1ffea4f303d906cc63e4b99edc32c1a;p=platform%2Fkernel%2Flinux-starfive.git crypto: skcipher - Add helper to retrieve driver name This patch adds the helper crypto_skcipher_driver_name which returns the driver name of the alg object for a given tfm. This is needed by ecryptfs. Signed-off-by: Herbert Xu --- diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index f7a03a1..5bb7056 100644 --- a/include/crypto/skcipher.h +++ b/include/crypto/skcipher.h @@ -231,6 +231,12 @@ static inline int crypto_has_skcipher(const char *alg_name, u32 type, crypto_skcipher_mask(mask)); } +static inline const char *crypto_skcipher_driver_name( + struct crypto_skcipher *tfm) +{ + return crypto_tfm_alg_name(crypto_skcipher_tfm(tfm)); +} + /** * crypto_skcipher_ivsize() - obtain IV size * @tfm: cipher handle