Commit 3908edf8 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: hash - Make crypto_ahash_alg helper available



Move the crypto_ahash_alg helper into include/crypto/internal so
that drivers can use it.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c7535fb2
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -31,12 +31,6 @@ struct ahash_request_priv {
	void *ubuf[] CRYPTO_MINALIGN_ATTR;
};

static inline struct ahash_alg *crypto_ahash_alg(struct crypto_ahash *hash)
{
	return container_of(crypto_hash_alg_common(hash), struct ahash_alg,
			    halg);
}

static int hash_walk_next(struct crypto_hash_walk *walk)
{
	unsigned int alignmask = walk->alignmask;
+6 −0
Original line number Diff line number Diff line
@@ -149,6 +149,12 @@ static inline struct ahash_alg *__crypto_ahash_alg(struct crypto_alg *alg)
			    halg);
}

static inline struct ahash_alg *crypto_ahash_alg(struct crypto_ahash *hash)
{
	return container_of(crypto_hash_alg_common(hash), struct ahash_alg,
			    halg);
}

static inline void crypto_ahash_set_statesize(struct crypto_ahash *tfm,
					      unsigned int size)
{