]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: nx - replace NX842_MEM_COMPRESS with function
authorDan Streetman <ddstreet@ieee.org>
Fri, 12 Jun 2015 14:58:47 +0000 (10:58 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 15 Jun 2015 10:15:57 +0000 (18:15 +0800)
commitacdc3d36be5aa376bcd0640af5cdd63d04f6e01d
tree7c82b26a28581a9502c59a96e8f8a4fc5b94df2f
parentee6cf3df385eb2612bd61e42f796cf992e9f7fca
crypto: nx - replace NX842_MEM_COMPRESS with function

Replace the NX842_MEM_COMPRESS define with a function that returns the
specific platform driver's required working memory size.

The common nx-842.c driver refuses to load if there is no platform
driver present, so instead of defining an approximate working memory
size that's the maximum approximate size of both platform driver's
size requirements, the platform driver can directly provide its
specific, i.e. sizeof(struct nx842_workmem), size requirements which
the 842-nx crypto compression driver will use.

This saves memory by both reducing the required size of each driver
to the specific sizeof() amount, as well as using the specific loaded
platform driver's required amount, instead of the maximum of both.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-842-crypto.c
drivers/crypto/nx/nx-842-powernv.c
drivers/crypto/nx/nx-842-pseries.c
drivers/crypto/nx/nx-842.c
drivers/crypto/nx/nx-842.h