aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/padlock-sha.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-27 03:52:07 -0400
committerDavid S. Miller <davem@davemloft.net>2007-10-27 03:52:07 -0400
commit68e3f5dd4db62619fdbe520d36c9ebf62e672256 (patch)
tree0a9b05227fc53cb72785a95298c643f5405fd7b4 /drivers/crypto/padlock-sha.c
parenta5a613a4291a8107008e4c40108a385cda71b08d (diff)
[CRYPTO] users: Fix up scatterlist conversion errors
This patch fixes the errors made in the users of the crypto layer during the sg_init_table conversion. It also adds a few conversions that were missing altogether. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/crypto/padlock-sha.c')
-rw-r--r--drivers/crypto/padlock-sha.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
index 4e8de162fc12..c666b4e0933e 100644
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -55,7 +55,7 @@ static void padlock_sha_bypass(struct crypto_tfm *tfm)
55 if (ctx(tfm)->data && ctx(tfm)->used) { 55 if (ctx(tfm)->data && ctx(tfm)->used) {
56 struct scatterlist sg; 56 struct scatterlist sg;
57 57
58 sg_set_buf(&sg, ctx(tfm)->data, ctx(tfm)->used); 58 sg_init_one(&sg, ctx(tfm)->data, ctx(tfm)->used);
59 crypto_hash_update(&ctx(tfm)->fallback, &sg, sg.length); 59 crypto_hash_update(&ctx(tfm)->fallback, &sg, sg.length);
60 } 60 }
61 61
@@ -79,7 +79,7 @@ static void padlock_sha_update(struct crypto_tfm *tfm,
79 79
80 if (unlikely(ctx(tfm)->bypass)) { 80 if (unlikely(ctx(tfm)->bypass)) {
81 struct scatterlist sg; 81 struct scatterlist sg;
82 sg_set_buf(&sg, (uint8_t *)data, length); 82 sg_init_one(&sg, (uint8_t *)data, length);
83 crypto_hash_update(&ctx(tfm)->fallback, &sg, length); 83 crypto_hash_update(&ctx(tfm)->fallback, &sg, length);
84 return; 84 return;
85 } 85 }