diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/Kconfig | 1 | ||||
-rw-r--r-- | drivers/crypto/picoxcell_crypto.c | 1 | ||||
-rw-r--r-- | drivers/crypto/s5p-sss.c | 2 | ||||
-rw-r--r-- | drivers/crypto/talitos.c | 3 | ||||
-rw-r--r-- | drivers/crypto/tegra-aes.c | 10 |
5 files changed, 11 insertions, 6 deletions
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index f6644f59fd9d..87ec4d027c25 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -254,6 +254,7 @@ config CRYPTO_DEV_OMAP_AES tristate "Support for OMAP AES hw engine" depends on ARCH_OMAP2 || ARCH_OMAP3 select CRYPTO_AES + select CRYPTO_BLKCIPHER2 help OMAP processors have AES module accelerator. Select this if you want to use the OMAP module for AES algorithms. diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index 410a03c01ca4..c983f869d2b7 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1863,6 +1863,7 @@ static int __devexit spacc_remove(struct platform_device *pdev) static const struct platform_device_id spacc_id_table[] = { { "picochip,spacc-ipsec", }, { "picochip,spacc-l2", }, + { } }; static struct platform_driver spacc_driver = { diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index a22714412cda..49ad8cbade69 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -30,7 +30,7 @@ #include <crypto/ctr.h> #include <plat/cpu.h> -#include <plat/dma.h> +#include <mach/dma.h> #define _SBF(s, v) ((v) << (s)) #define _BIT(b) _SBF(b, 1) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index da1112765a44..09b184adf31b 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -936,8 +936,7 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count, sg_count--; link_tbl_ptr--; } - link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len) - + cryptlen); + be16_add_cpu(&link_tbl_ptr->len, cryptlen); /* tag end of link table */ link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN; diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index e69f3bc473be..eb32fd8cad14 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c @@ -672,8 +672,10 @@ static int tegra_aes_get_random(struct crypto_rng *tfm, u8 *rdata, mutex_lock(&aes_lock); ret = clk_prepare_enable(dd->aes_clk); - if (ret) + if (ret) { + mutex_unlock(&aes_lock); return ret; + } ctx->dd = dd; dd->ctx = ctx; @@ -757,8 +759,10 @@ static int tegra_aes_rng_reset(struct crypto_rng *tfm, u8 *seed, dd->flags = FLAGS_ENCRYPT | FLAGS_RNG; ret = clk_prepare_enable(dd->aes_clk); - if (ret) + if (ret) { + mutex_unlock(&aes_lock); return ret; + } aes_set_key(dd); @@ -1029,7 +1033,7 @@ out: if (dd->buf_out) dma_free_coherent(dev, AES_HW_DMA_BUFFER_SIZE_BYTES, dd->buf_out, dd->dma_buf_out); - if (IS_ERR(dd->aes_clk)) + if (!IS_ERR(dd->aes_clk)) clk_put(dd->aes_clk); if (aes_wq) destroy_workqueue(aes_wq); |