summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2011-01-11 14:03:54 +0530
committerColin Cross <ccross@android.com>2011-01-12 00:08:22 -0800
commit1c10dcd996647eb616bd9fac854dbdc834ad13e4 (patch)
tree56d2db4981b18b6f9d048b566ee02bf99d159e05 /drivers/crypto
parent269ae7240fc77645c43fd1577191620467de9238 (diff)
crypto: tegra-aes: call INIT_COMPLETION before setting the transfer
Change-Id: I368a9bf8aa1c311532e54d18a813b556576b8da1 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/tegra-aes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c
index ef17074b587a..9aed3e8ee0ff 100644
--- a/drivers/crypto/tegra-aes.c
+++ b/drivers/crypto/tegra-aes.c
@@ -309,6 +309,7 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr,
aes_writel(dd, value, SECURE_INPUT_SELECT);
aes_writel(dd, out_addr, SECURE_DEST_ADDR);
+ INIT_COMPLETION(dd->op_complete);
for (i = 0; i < qlen - 1; i++) {
do {
@@ -320,7 +321,6 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr,
aes_writel(dd, cmdq[i], ICMDQUE_WR);
}
- INIT_COMPLETION(dd->op_complete);
ret = wait_for_completion_timeout(&dd->op_complete, msecs_to_jiffies(150));
if (ret == 0) {
dev_err(dd->dev, "timed out (0x%x)\n",