[PATCH 09/12] memory: omap-gpmc: use module_platform_driver()

Roger Quadros rogerq at ti.com
Fri Jul 10 05:23:36 PDT 2015


Stop registering driver at postcore and do it
the standard way.

Signed-off-by: Roger Quadros <rogerq at ti.com>
---
 drivers/memory/omap-gpmc.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 995e9b8..f19edc2 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -1914,19 +1914,7 @@ static struct platform_driver gpmc_driver = {
 	},
 };
 
-static __init int gpmc_init(void)
-{
-	return platform_driver_register(&gpmc_driver);
-}
-
-static __exit void gpmc_exit(void)
-{
-	platform_driver_unregister(&gpmc_driver);
-
-}
-
-postcore_initcall(gpmc_init);
-module_exit(gpmc_exit);
+module_platform_driver(gpmc_driver);
 
 static struct omap3_gpmc_regs gpmc_context;
 
-- 
2.1.4




More information about the linux-mtd mailing list