mtd: bf5xx_nand: Use module_platform_driver()
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 18 Mar 2013 11:16:49 +0000 (16:46 +0530)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 5 Apr 2013 13:04:45 +0000 (14:04 +0100)
module_platform_driver macro removes some boilerplate and makes
the code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/bf5xx_nand.c

index 4271e94..776df36 100644 (file)
@@ -874,21 +874,7 @@ static struct platform_driver bf5xx_nand_driver = {
        },
 };
 
-static int __init bf5xx_nand_init(void)
-{
-       printk(KERN_INFO "%s, Version %s (c) 2007 Analog Devices, Inc.\n",
-               DRV_DESC, DRV_VERSION);
-
-       return platform_driver_register(&bf5xx_nand_driver);
-}
-
-static void __exit bf5xx_nand_exit(void)
-{
-       platform_driver_unregister(&bf5xx_nand_driver);
-}
-
-module_init(bf5xx_nand_init);
-module_exit(bf5xx_nand_exit);
+module_platform_driver(bf5xx_nand_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR(DRV_AUTHOR);