]> git.karo-electronics.de Git - linux-beck.git/commitdiff
crypto: convert drivers/crypto/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Sat, 26 Nov 2011 13:26:19 +0000 (21:26 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 30 Nov 2011 08:12:48 +0000 (16:12 +0800)
This patch converts the drivers in drivers/crypto/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: James Hsiao <jhsiao@amcc.com>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/amcc/crypto4xx_core.c
drivers/crypto/caam/ctrl.c
drivers/crypto/mv_cesa.c
drivers/crypto/picoxcell_crypto.c
drivers/crypto/s5p-sss.c
drivers/crypto/talitos.c

index 1d103f997dc21b7c175e4b4d2eae4199974b279c..13f8e1a149889076aa41f95b785702c0a6fd02a5 100644 (file)
@@ -1292,18 +1292,7 @@ static struct platform_driver crypto4xx_driver = {
        .remove         = crypto4xx_remove,
 };
 
-static int __init crypto4xx_init(void)
-{
-       return platform_driver_register(&crypto4xx_driver);
-}
-
-static void __exit crypto4xx_exit(void)
-{
-       platform_driver_unregister(&crypto4xx_driver);
-}
-
-module_init(crypto4xx_init);
-module_exit(crypto4xx_exit);
+module_platform_driver(crypto4xx_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("James Hsiao <jhsiao@amcc.com>");
index 73988bb7322abde6822094851801a0beb97b9169..048bb23432316c7e3cf51899538ca736b10943b3 100644 (file)
@@ -253,18 +253,7 @@ static struct platform_driver caam_driver = {
        .remove      = __devexit_p(caam_remove),
 };
 
-static int __init caam_base_init(void)
-{
-       return platform_driver_register(&caam_driver);
-}
-
-static void __exit caam_base_exit(void)
-{
-       return platform_driver_unregister(&caam_driver);
-}
-
-module_init(caam_base_init);
-module_exit(caam_base_exit);
+module_platform_driver(caam_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("FSL CAAM request backend");
index 5c6f56f21443ae7e01a1b9fc90b3202674fbaa37..015c0fcea0bd00b10c29b33c20eb5ce07e03aa70 100644 (file)
@@ -1126,17 +1126,7 @@ static struct platform_driver marvell_crypto = {
 };
 MODULE_ALIAS("platform:mv_crypto");
 
-static int __init mv_crypto_init(void)
-{
-       return platform_driver_register(&marvell_crypto);
-}
-module_init(mv_crypto_init);
-
-static void __exit mv_crypto_exit(void)
-{
-       platform_driver_unregister(&marvell_crypto);
-}
-module_exit(mv_crypto_exit);
+module_platform_driver(marvell_crypto);
 
 MODULE_AUTHOR("Sebastian Andrzej Siewior <sebastian@breakpoint.cc>");
 MODULE_DESCRIPTION("Support for Marvell's cryptographic engine");
index a2b553eabbdb6db38839ba1f14cc26a61edb31d2..9b1571c2a5a4dd066216eb1047dd5f75c53c68d1 100644 (file)
@@ -1854,17 +1854,7 @@ static struct platform_driver spacc_driver = {
        .id_table       = spacc_id_table,
 };
 
-static int __init spacc_init(void)
-{
-       return platform_driver_register(&spacc_driver);
-}
-module_init(spacc_init);
-
-static void __exit spacc_exit(void)
-{
-       platform_driver_unregister(&spacc_driver);
-}
-module_exit(spacc_exit);
+module_platform_driver(spacc_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jamie Iles");
index 8115417a1c93af7d3155964de863add26183e44e..3376bca200fc86c33f1472864b28299906d7a5ab 100644 (file)
@@ -683,18 +683,7 @@ static struct platform_driver s5p_aes_crypto = {
        },
 };
 
-static int __init s5p_aes_mod_init(void)
-{
-       return  platform_driver_register(&s5p_aes_crypto);
-}
-
-static void __exit s5p_aes_mod_exit(void)
-{
-       platform_driver_unregister(&s5p_aes_crypto);
-}
-
-module_init(s5p_aes_mod_init);
-module_exit(s5p_aes_mod_exit);
+module_platform_driver(s5p_aes_crypto);
 
 MODULE_DESCRIPTION("S5PV210 AES hw acceleration support.");
 MODULE_LICENSE("GPL v2");
index 92c0ca75400dbe7acd5a6e8249ec1c601f9b6670..230509e9602bd8fd40255ae3fb154af7701f0ac2 100644 (file)
@@ -2894,17 +2894,7 @@ static struct platform_driver talitos_driver = {
        .remove = talitos_remove,
 };
 
-static int __init talitos_init(void)
-{
-       return platform_driver_register(&talitos_driver);
-}
-module_init(talitos_init);
-
-static void __exit talitos_exit(void)
-{
-       platform_driver_unregister(&talitos_driver);
-}
-module_exit(talitos_exit);
+module_platform_driver(talitos_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Kim Phillips <kim.phillips@freescale.com>");