crypto: omap-aes - Use module_platform_driver macro
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 4 Mar 2013 09:39:42 +0000 (15:09 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 10 Mar 2013 10:16:35 +0000 (18:16 +0800)
module_platform_driver() makes the code simpler by eliminating boilerplate
code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-aes.c

index 1e5a17adefe4077c70910f955c20bcfaaad8263b..ee15b0f7849ad567d74cd70a9e125f20fe4f1814 100644 (file)
@@ -1248,18 +1248,7 @@ static struct platform_driver omap_aes_driver = {
        },
 };
 
-static int __init omap_aes_mod_init(void)
-{
-       return  platform_driver_register(&omap_aes_driver);
-}
-
-static void __exit omap_aes_mod_exit(void)
-{
-       platform_driver_unregister(&omap_aes_driver);
-}
-
-module_init(omap_aes_mod_init);
-module_exit(omap_aes_mod_exit);
+module_platform_driver(omap_aes_driver);
 
 MODULE_DESCRIPTION("OMAP AES hw acceleration support.");
 MODULE_LICENSE("GPL v2");