diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-26 08:26:19 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-30 03:12:48 -0500 |
commit | 741e8c2d8177eca656bc015ef83ab84d817edf8c (patch) | |
tree | 95608ec1869898ff9707a32b265234dbb1ed1105 /drivers/crypto | |
parent | b21cb324f141d16833137ef0355f686efb9bd84f (diff) |
crypto: convert drivers/crypto/* to use module_platform_driver()
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>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/amcc/crypto4xx_core.c | 13 | ||||
-rw-r--r-- | drivers/crypto/caam/ctrl.c | 13 | ||||
-rw-r--r-- | drivers/crypto/mv_cesa.c | 12 | ||||
-rw-r--r-- | drivers/crypto/picoxcell_crypto.c | 12 | ||||
-rw-r--r-- | drivers/crypto/s5p-sss.c | 13 | ||||
-rw-r--r-- | drivers/crypto/talitos.c | 12 |
6 files changed, 6 insertions, 69 deletions
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 1d103f997dc2..13f8e1a14988 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c | |||
@@ -1292,18 +1292,7 @@ static struct platform_driver crypto4xx_driver = { | |||
1292 | .remove = crypto4xx_remove, | 1292 | .remove = crypto4xx_remove, |
1293 | }; | 1293 | }; |
1294 | 1294 | ||
1295 | static int __init crypto4xx_init(void) | 1295 | module_platform_driver(crypto4xx_driver); |
1296 | { | ||
1297 | return platform_driver_register(&crypto4xx_driver); | ||
1298 | } | ||
1299 | |||
1300 | static void __exit crypto4xx_exit(void) | ||
1301 | { | ||
1302 | platform_driver_unregister(&crypto4xx_driver); | ||
1303 | } | ||
1304 | |||
1305 | module_init(crypto4xx_init); | ||
1306 | module_exit(crypto4xx_exit); | ||
1307 | 1296 | ||
1308 | MODULE_LICENSE("GPL"); | 1297 | MODULE_LICENSE("GPL"); |
1309 | MODULE_AUTHOR("James Hsiao <jhsiao@amcc.com>"); | 1298 | MODULE_AUTHOR("James Hsiao <jhsiao@amcc.com>"); |
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 73988bb7322a..048bb2343231 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
@@ -253,18 +253,7 @@ static struct platform_driver caam_driver = { | |||
253 | .remove = __devexit_p(caam_remove), | 253 | .remove = __devexit_p(caam_remove), |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static int __init caam_base_init(void) | 256 | module_platform_driver(caam_driver); |
257 | { | ||
258 | return platform_driver_register(&caam_driver); | ||
259 | } | ||
260 | |||
261 | static void __exit caam_base_exit(void) | ||
262 | { | ||
263 | return platform_driver_unregister(&caam_driver); | ||
264 | } | ||
265 | |||
266 | module_init(caam_base_init); | ||
267 | module_exit(caam_base_exit); | ||
268 | 257 | ||
269 | MODULE_LICENSE("GPL"); | 258 | MODULE_LICENSE("GPL"); |
270 | MODULE_DESCRIPTION("FSL CAAM request backend"); | 259 | MODULE_DESCRIPTION("FSL CAAM request backend"); |
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 5c6f56f21443..015c0fcea0bd 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
@@ -1126,17 +1126,7 @@ static struct platform_driver marvell_crypto = { | |||
1126 | }; | 1126 | }; |
1127 | MODULE_ALIAS("platform:mv_crypto"); | 1127 | MODULE_ALIAS("platform:mv_crypto"); |
1128 | 1128 | ||
1129 | static int __init mv_crypto_init(void) | 1129 | module_platform_driver(marvell_crypto); |
1130 | { | ||
1131 | return platform_driver_register(&marvell_crypto); | ||
1132 | } | ||
1133 | module_init(mv_crypto_init); | ||
1134 | |||
1135 | static void __exit mv_crypto_exit(void) | ||
1136 | { | ||
1137 | platform_driver_unregister(&marvell_crypto); | ||
1138 | } | ||
1139 | module_exit(mv_crypto_exit); | ||
1140 | 1130 | ||
1141 | MODULE_AUTHOR("Sebastian Andrzej Siewior <sebastian@breakpoint.cc>"); | 1131 | MODULE_AUTHOR("Sebastian Andrzej Siewior <sebastian@breakpoint.cc>"); |
1142 | MODULE_DESCRIPTION("Support for Marvell's cryptographic engine"); | 1132 | MODULE_DESCRIPTION("Support for Marvell's cryptographic engine"); |
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index a2b553eabbdb..9b1571c2a5a4 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c | |||
@@ -1854,17 +1854,7 @@ static struct platform_driver spacc_driver = { | |||
1854 | .id_table = spacc_id_table, | 1854 | .id_table = spacc_id_table, |
1855 | }; | 1855 | }; |
1856 | 1856 | ||
1857 | static int __init spacc_init(void) | 1857 | module_platform_driver(spacc_driver); |
1858 | { | ||
1859 | return platform_driver_register(&spacc_driver); | ||
1860 | } | ||
1861 | module_init(spacc_init); | ||
1862 | |||
1863 | static void __exit spacc_exit(void) | ||
1864 | { | ||
1865 | platform_driver_unregister(&spacc_driver); | ||
1866 | } | ||
1867 | module_exit(spacc_exit); | ||
1868 | 1858 | ||
1869 | MODULE_LICENSE("GPL"); | 1859 | MODULE_LICENSE("GPL"); |
1870 | MODULE_AUTHOR("Jamie Iles"); | 1860 | MODULE_AUTHOR("Jamie Iles"); |
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 8115417a1c93..3376bca200fc 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c | |||
@@ -683,18 +683,7 @@ static struct platform_driver s5p_aes_crypto = { | |||
683 | }, | 683 | }, |
684 | }; | 684 | }; |
685 | 685 | ||
686 | static int __init s5p_aes_mod_init(void) | 686 | module_platform_driver(s5p_aes_crypto); |
687 | { | ||
688 | return platform_driver_register(&s5p_aes_crypto); | ||
689 | } | ||
690 | |||
691 | static void __exit s5p_aes_mod_exit(void) | ||
692 | { | ||
693 | platform_driver_unregister(&s5p_aes_crypto); | ||
694 | } | ||
695 | |||
696 | module_init(s5p_aes_mod_init); | ||
697 | module_exit(s5p_aes_mod_exit); | ||
698 | 687 | ||
699 | MODULE_DESCRIPTION("S5PV210 AES hw acceleration support."); | 688 | MODULE_DESCRIPTION("S5PV210 AES hw acceleration support."); |
700 | MODULE_LICENSE("GPL v2"); | 689 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 92c0ca75400d..230509e9602b 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -2894,17 +2894,7 @@ static struct platform_driver talitos_driver = { | |||
2894 | .remove = talitos_remove, | 2894 | .remove = talitos_remove, |
2895 | }; | 2895 | }; |
2896 | 2896 | ||
2897 | static int __init talitos_init(void) | 2897 | module_platform_driver(talitos_driver); |
2898 | { | ||
2899 | return platform_driver_register(&talitos_driver); | ||
2900 | } | ||
2901 | module_init(talitos_init); | ||
2902 | |||
2903 | static void __exit talitos_exit(void) | ||
2904 | { | ||
2905 | platform_driver_unregister(&talitos_driver); | ||
2906 | } | ||
2907 | module_exit(talitos_exit); | ||
2908 | 2898 | ||
2909 | MODULE_LICENSE("GPL"); | 2899 | MODULE_LICENSE("GPL"); |
2910 | MODULE_AUTHOR("Kim Phillips <kim.phillips@freescale.com>"); | 2900 | MODULE_AUTHOR("Kim Phillips <kim.phillips@freescale.com>"); |