Skip to contentSkip to conversation

ARM/omap1: use module_platform_driver macro

PATCH RESEND New Srinivas KANDAGATLA 2 participants 2 messages Oct 12, 2012 – Nov 7, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/6 ARM/omap1: use module_platform_driver macro

From: Srinivas Kandagatla <[email protected]>

This patch removes some code duplication by using
module_platform_driver.

---
 arch/arm/mach-omap1/mailbox.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
arch/arm/mach-omap1/mailbox.c +1 -13
index e962926..45c8719 100644
@@ -179,19 +179,7 @@ static struct platform_driver omap1_mbox_driver = {
 		.name	= "omap-mailbox",
 	},
 };
-
-static int __init omap1_mbox_init(void)
-{
-	return platform_driver_register(&omap1_mbox_driver);
-}
-
-static void __exit omap1_mbox_exit(void)
-{
-	platform_driver_unregister(&omap1_mbox_driver);
-}
-
-module_init(omap1_mbox_init);
-module_exit(omap1_mbox_exit);
+module_platform_driver(omap1_mbox_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions");
Signature · 1 line
1.7.0.4
reviewer
#1 lore raw

PATCH RESEND 1/6 ARM/omap1: use module_platform_driver macro

Quoted 4 lines · Srinivas KANDAGATLA

From: Srinivas Kandagatla <[email protected]>

This patch removes some code duplication by using
module_platform_driver.

Sorry for delay on these, we're moving the mailbox code to live under drivers, so these may need to wait a little bit.

Regards,

Tony

Quoted 33 lines
---
 arch/arm/mach-omap1/mailbox.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
arch/arm/mach-omap1/mailbox.c +1 -13
index e962926..45c8719 100644
@@ -179,19 +179,7 @@ static struct platform_driver omap1_mbox_driver = {
 		.name	= "omap-mailbox",
 	},
 };
-
-static int __init omap1_mbox_init(void)
-{
-	return platform_driver_register(&omap1_mbox_driver);
-}
-
-static void __exit omap1_mbox_exit(void)
-{
-	platform_driver_unregister(&omap1_mbox_driver);
-}
-
-module_init(omap1_mbox_init);
-module_exit(omap1_mbox_exit);
+module_platform_driver(omap1_mbox_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions");
Signature · 1 line
1.7.0.4