aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorRomain Perier <romain.perier@free-electrons.com>2016-06-21 04:08:31 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2016-06-23 06:13:59 -0400
commite26df73f80290efe5c772d94ac3a3cf2b077fe5b (patch)
tree0d03d5290aba7c3d1396b207f07257e105a3b9c7 /drivers/crypto
parent7ea0da1d75e0d03f9ec484d2038e3caf06024b17 (diff)
crypto: marvell - Add a macro constant for the size of the crypto queue
Adding a macro constant to be used for the size of the crypto queue, instead of using a numeric value directly. It will be easier to maintain in case we add more than one crypto queue of the same size. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/marvell/cesa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
index e8ef9fd24a16..47552c12e8c6 100644
--- a/drivers/crypto/marvell/cesa.c
+++ b/drivers/crypto/marvell/cesa.c
@@ -31,6 +31,9 @@
31 31
32#include "cesa.h" 32#include "cesa.h"
33 33
34/* Limit of the crypto queue before reaching the backlog */
35#define CESA_CRYPTO_DEFAULT_MAX_QLEN 50
36
34static int allhwsupport = !IS_ENABLED(CONFIG_CRYPTO_DEV_MV_CESA); 37static int allhwsupport = !IS_ENABLED(CONFIG_CRYPTO_DEV_MV_CESA);
35module_param_named(allhwsupport, allhwsupport, int, 0444); 38module_param_named(allhwsupport, allhwsupport, int, 0444);
36MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the mv_cesa driver)"); 39MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the mv_cesa driver)");
@@ -416,7 +419,7 @@ static int mv_cesa_probe(struct platform_device *pdev)
416 return -ENOMEM; 419 return -ENOMEM;
417 420
418 spin_lock_init(&cesa->lock); 421 spin_lock_init(&cesa->lock);
419 crypto_init_queue(&cesa->queue, 50); 422 crypto_init_queue(&cesa->queue, CESA_CRYPTO_DEFAULT_MAX_QLEN);
420 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); 423 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
421 cesa->regs = devm_ioremap_resource(dev, res); 424 cesa->regs = devm_ioremap_resource(dev, res);
422 if (IS_ERR(cesa->regs)) 425 if (IS_ERR(cesa->regs))