hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/crypto/tgr192.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Cryptographic API.
34 *
....@@ -14,12 +15,6 @@
1415 *
1516 * Adapted for Linux Kernel Crypto by Aaron Grothe
1617 * ajgrothe@yahoo.com, February 22, 2005
17
- *
18
- * This program is free software; you can redistribute it and/or modify
19
- * it under the terms of the GNU General Public License as published by
20
- * the Free Software Foundation; either version 2 of the License, or
21
- * (at your option) any later version.
22
- *
2318 */
2419 #include <crypto/internal/hash.h>
2520 #include <linux/init.h>
....@@ -560,7 +555,7 @@
560555 __le32 *le32p;
561556 u32 t, msb, lsb;
562557
563
- tgr192_update(desc, NULL, 0); /* flush */ ;
558
+ tgr192_update(desc, NULL, 0); /* flush */
564559
565560 msb = 0;
566561 t = tctx->nblocks;
....@@ -588,7 +583,7 @@
588583 while (tctx->count < 64) {
589584 tctx->hash[tctx->count++] = 0;
590585 }
591
- tgr192_update(desc, NULL, 0); /* flush */ ;
586
+ tgr192_update(desc, NULL, 0); /* flush */
592587 memset(tctx->hash, 0, 56); /* fill next block with zeroes */
593588 }
594589 /* append the 64 bit count */
....@@ -635,9 +630,10 @@
635630 .final = tgr192_final,
636631 .descsize = sizeof(struct tgr192_ctx),
637632 .base = {
638
- .cra_name = "tgr192",
639
- .cra_blocksize = TGR192_BLOCK_SIZE,
640
- .cra_module = THIS_MODULE,
633
+ .cra_name = "tgr192",
634
+ .cra_driver_name = "tgr192-generic",
635
+ .cra_blocksize = TGR192_BLOCK_SIZE,
636
+ .cra_module = THIS_MODULE,
641637 }
642638 }, {
643639 .digestsize = TGR160_DIGEST_SIZE,
....@@ -646,9 +642,10 @@
646642 .final = tgr160_final,
647643 .descsize = sizeof(struct tgr192_ctx),
648644 .base = {
649
- .cra_name = "tgr160",
650
- .cra_blocksize = TGR192_BLOCK_SIZE,
651
- .cra_module = THIS_MODULE,
645
+ .cra_name = "tgr160",
646
+ .cra_driver_name = "tgr160-generic",
647
+ .cra_blocksize = TGR192_BLOCK_SIZE,
648
+ .cra_module = THIS_MODULE,
652649 }
653650 }, {
654651 .digestsize = TGR128_DIGEST_SIZE,
....@@ -657,9 +654,10 @@
657654 .final = tgr128_final,
658655 .descsize = sizeof(struct tgr192_ctx),
659656 .base = {
660
- .cra_name = "tgr128",
661
- .cra_blocksize = TGR192_BLOCK_SIZE,
662
- .cra_module = THIS_MODULE,
657
+ .cra_name = "tgr128",
658
+ .cra_driver_name = "tgr128-generic",
659
+ .cra_blocksize = TGR192_BLOCK_SIZE,
660
+ .cra_module = THIS_MODULE,
663661 }
664662 } };
665663
....@@ -677,7 +675,7 @@
677675 MODULE_ALIAS_CRYPTO("tgr160");
678676 MODULE_ALIAS_CRYPTO("tgr128");
679677
680
-module_init(tgr192_mod_init);
678
+subsys_initcall(tgr192_mod_init);
681679 module_exit(tgr192_mod_fini);
682680
683681 MODULE_LICENSE("GPL");