]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/s390/crypto/sha256_s390.c
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
[linux-2.6-omap-h63xx.git] / arch / s390 / crypto / sha256_s390.c
index f573df30f31d28429b2f69ea819aec6a5775a8fa..78436c696d375c93b2a85f79ae6d2ebb512c3ee2 100644 (file)
@@ -4,7 +4,7 @@
  * s390 implementation of the SHA256 Secure Hash Algorithm.
  *
  * s390 Version:
- *   Copyright (C) 2005 IBM Deutschland GmbH, IBM Corporation
+ *   Copyright IBM Corp. 2005,2007
  *   Author(s): Jan Glauber (jang@de.ibm.com)
  *
  * Derived from "crypto/sha256.c"
@@ -127,6 +127,8 @@ static void sha256_final(struct crypto_tfm *tfm, u8 *out)
 
 static struct crypto_alg alg = {
        .cra_name       =       "sha256",
+       .cra_driver_name =      "sha256-s390",
+       .cra_priority   =       CRYPT_S390_PRIORITY,
        .cra_flags      =       CRYPTO_ALG_TYPE_DIGEST,
        .cra_blocksize  =       SHA256_BLOCK_SIZE,
        .cra_ctxsize    =       sizeof(struct s390_sha256_ctx),
@@ -141,15 +143,10 @@ static struct crypto_alg alg = {
 
 static int init(void)
 {
-       int ret;
-
        if (!crypt_s390_func_available(KIMD_SHA_256))
-               return -ENOSYS;
+               return -EOPNOTSUPP;
 
-       ret = crypto_register_alg(&alg);
-       if (ret != 0)
-               printk(KERN_INFO "crypt_s390: sha256_s390 couldn't be loaded.");
-       return ret;
+       return crypto_register_alg(&alg);
 }
 
 static void __exit fini(void)