aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/omap-sham.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index c8d30eb4794a..d88d7ebfffa7 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -72,7 +72,6 @@
72 72
73#define DEFAULT_TIMEOUT_INTERVAL HZ 73#define DEFAULT_TIMEOUT_INTERVAL HZ
74 74
75#define FLAGS_FIRST 0x0001
76#define FLAGS_FINUP 0x0002 75#define FLAGS_FINUP 0x0002
77#define FLAGS_FINAL 0x0004 76#define FLAGS_FINAL 0x0004
78#define FLAGS_FAST 0x0008 77#define FLAGS_FAST 0x0008
@@ -513,8 +512,6 @@ static int omap_sham_init(struct ahash_request *req)
513 512
514 ctx->flags = 0; 513 ctx->flags = 0;
515 514
516 ctx->flags |= FLAGS_FIRST;
517
518 dev_dbg(dd->dev, "init: digest size: %d\n", 515 dev_dbg(dd->dev, "init: digest size: %d\n",
519 crypto_ahash_digestsize(tfm)); 516 crypto_ahash_digestsize(tfm));
520 517
@@ -739,12 +736,9 @@ static int omap_sham_update(struct ahash_request *req)
739 /* may be can use faster functions */ 736 /* may be can use faster functions */
740 int aligned = IS_ALIGNED((u32)ctx->sg->offset, 737 int aligned = IS_ALIGNED((u32)ctx->sg->offset,
741 sizeof(u32)); 738 sizeof(u32));
742 739 if (aligned)
743 if (aligned && (ctx->flags & FLAGS_FIRST))
744 /* digest: first and final */ 740 /* digest: first and final */
745 ctx->flags |= FLAGS_FAST; 741 ctx->flags |= FLAGS_FAST;
746
747 ctx->flags &= ~FLAGS_FIRST;
748 } 742 }
749 } else if (ctx->bufcnt + ctx->total <= ctx->buflen) { 743 } else if (ctx->bufcnt + ctx->total <= ctx->buflen) {
750 /* if not finaup -> not fast */ 744 /* if not finaup -> not fast */