mtd: denali_dt: Use module_platform_driver()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Apr 5 09:59:02 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=82fc812ca458a98767b659171a43244dc1ddaf82
Commit:     82fc812ca458a98767b659171a43244dc1ddaf82
Parent:     6c67050ab108bcce2576fa1d7a0557eb0376520a
Author:     Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Mon Mar 18 15:11:12 2013 +0530
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 14:04:06 2013 +0100

    mtd: denali_dt: Use module_platform_driver()
    
    module_platform_driver() removes some boilerplate and makes the code
    simpler.
    
    Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/denali_dt.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index 02988b0..eb68979 100644
--- a/drivers/mtd/nand/denali_dt.c
+++ b/drivers/mtd/nand/denali_dt.c
@@ -150,17 +150,7 @@ static struct platform_driver denali_dt_driver = {
 	},
 };
 
-static int __init denali_init_dt(void)
-{
-	return platform_driver_register(&denali_dt_driver);
-}
-module_init(denali_init_dt);
-
-static void __exit denali_exit_dt(void)
-{
-	platform_driver_unregister(&denali_dt_driver);
-}
-module_exit(denali_exit_dt);
+module_platform_driver(denali_dt_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jamie Iles");



More information about the linux-mtd-cvs mailing list