diff options
author | James Morris <james.l.morris@oracle.com> | 2013-01-07 12:06:43 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2013-01-07 12:06:43 +1100 |
commit | ca10c662b0ec80db86864277a94889cc63bae958 (patch) | |
tree | daaf99d935098038fd66e1bd238dcd3746dc5ea4 /crypto/wp512.c | |
parent | fb6e03d937365cba54d5d8d923158562169ebfd1 (diff) | |
parent | 1c11ed58397f048d8187222927092b397a149d70 (diff) | |
download | linux-crypto-ca10c662b0ec80db86864277a94889cc63bae958.tar.gz linux-crypto-ca10c662b0ec80db86864277a94889cc63bae958.zip |
Merge tag 'v3.8-rc2' into next
Sync to Linus' tree.
Linux 3.8-rc2
Diffstat (limited to '')
-rw-r--r-- | crypto/wp512.c | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/crypto/wp512.c b/crypto/wp512.c index 71719a2b..180f1d6e 100644 --- a/crypto/wp512.c +++ b/crypto/wp512.c @@ -1119,7 +1119,7 @@ static int wp256_final(struct shash_desc *desc, u8 *out) return 0; } -static struct shash_alg wp512 = { +static struct shash_alg wp_algs[3] = { { .digestsize = WP512_DIGEST_SIZE, .init = wp512_init, .update = wp512_update, @@ -1131,9 +1131,7 @@ static struct shash_alg wp512 = { .cra_blocksize = WP512_BLOCK_SIZE, .cra_module = THIS_MODULE, } -}; - -static struct shash_alg wp384 = { +}, { .digestsize = WP384_DIGEST_SIZE, .init = wp512_init, .update = wp512_update, @@ -1145,9 +1143,7 @@ static struct shash_alg wp384 = { .cra_blocksize = WP512_BLOCK_SIZE, .cra_module = THIS_MODULE, } -}; - -static struct shash_alg wp256 = { +}, { .digestsize = WP256_DIGEST_SIZE, .init = wp512_init, .update = wp512_update, @@ -1159,39 +1155,16 @@ static struct shash_alg wp256 = { .cra_blocksize = WP512_BLOCK_SIZE, .cra_module = THIS_MODULE, } -}; +} }; static int __init wp512_mod_init(void) { - int ret = 0; - - ret = crypto_register_shash(&wp512); - - if (ret < 0) - goto out; - - ret = crypto_register_shash(&wp384); - if (ret < 0) - { - crypto_unregister_shash(&wp512); - goto out; - } - - ret = crypto_register_shash(&wp256); - if (ret < 0) - { - crypto_unregister_shash(&wp512); - crypto_unregister_shash(&wp384); - } -out: - return ret; + return crypto_register_shashes(wp_algs, ARRAY_SIZE(wp_algs)); } static void __exit wp512_mod_fini(void) { - crypto_unregister_shash(&wp512); - crypto_unregister_shash(&wp384); - crypto_unregister_shash(&wp256); + crypto_unregister_shashes(wp_algs, ARRAY_SIZE(wp_algs)); } MODULE_ALIAS("wp384"); |