summaryrefslogtreecommitdiffstats
path: root/cryptodev_main.c
diff options
context:
space:
mode:
authorMichael Weiser <michael@weiser.dinsnail.net>2010-02-26 18:35:49 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-02-26 18:35:49 +0100
commit1dfb8ca06b6332b70aa9157605eed984620b50df (patch)
tree331dcb3edd12fb3bff963cb455ee99a30b16c7c9 /cryptodev_main.c
parent99f830ad944ba6944ab1f5265ab10532eaef5589 (diff)
downloadcryptodev-linux-1dfb8ca06b6332b70aa9157605eed984620b50df.tar.gz
cryptodev-linux-1dfb8ca06b6332b70aa9157605eed984620b50df.tar.xz
cryptodev-linux-1dfb8ca06b6332b70aa9157605eed984620b50df.zip
cryptodev initialises its sg with sg_set_buf. Although I'm not
sure, what the repercussions are, I changed it to sg_init_one with no ill effects. Added comment for wait_for_completion(). Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'cryptodev_main.c')
-rw-r--r--cryptodev_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cryptodev_main.c b/cryptodev_main.c
index 1d6b614..63ce162 100644
--- a/cryptodev_main.c
+++ b/cryptodev_main.c
@@ -345,7 +345,7 @@ crypto_run(struct fcrypt *fcr, struct crypt_op *cop)
unsigned int ivsize=0;
size_t nbytes, bufsize;
int ret = 0;
- uint8_t hash_output[HASH_MAX_LEN];
+ uint8_t hash_output[AALG_MAX_RESULT_LEN];
if (unlikely(cop->op != COP_ENCRYPT && cop->op != COP_DECRYPT)) {
dprintk(1, KERN_DEBUG, "invalid operation op=%u\n", cop->op);
@@ -405,7 +405,7 @@ crypto_run(struct fcrypt *fcr, struct crypt_op *cop)
copy_from_user(data, src, current_len);
- sg_set_buf(&sg, data, current_len);
+ sg_init_one(&sg, data, current_len);
/* Always hash before encryption and after decryption. Maybe
* we should introduce a flag to switch... TBD later on.
@@ -586,7 +586,7 @@ struct file_operations cryptodev_fops = {
};
struct miscdevice cryptodev = {
- .minor = CRYPTODEV_MINOR,
+ .minor = MISC_DYNAMIC_MINOR,
.name = "crypto",
.fops = &cryptodev_fops,
};