2013-03-04 09:50:10

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 1/2] crypto: omap-aes: Use module_platform_driver macro

module_platform_driver() makes the code simpler by eliminating boilerplate
code.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/crypto/omap-aes.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 6aa425f..bd304e1 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -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");
--
1.7.4.1


2013-03-04 09:50:13

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 2/2] crypto: omap-sham: Use module_platform_driver macro

module_platform_driver() makes the code simpler by eliminating boilerplate
code.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/crypto/omap-sham.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 3d1611f..7a67d30 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1813,18 +1813,7 @@ static struct platform_driver omap_sham_driver = {
},
};

-static int __init omap_sham_mod_init(void)
-{
- return platform_driver_register(&omap_sham_driver);
-}
-
-static void __exit omap_sham_mod_exit(void)
-{
- platform_driver_unregister(&omap_sham_driver);
-}
-
-module_init(omap_sham_mod_init);
-module_exit(omap_sham_mod_exit);
+module_platform_driver(omap_sham_driver);

MODULE_DESCRIPTION("OMAP SHA1/MD5 hw acceleration support.");
MODULE_LICENSE("GPL v2");
--
1.7.4.1

2013-03-10 10:17:32

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 1/2] crypto: omap-aes: Use module_platform_driver macro

On Mon, Mar 04, 2013 at 03:09:42PM +0530, Sachin Kamat wrote:
> module_platform_driver() makes the code simpler by eliminating boilerplate
> code.
>
> Signed-off-by: Sachin Kamat <[email protected]>

Bot pathces applied.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt