public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/7] mtd: docg3: use module_platform_driver_probe()
@ 2013-03-05  4:28 Jingoo Han
  2013-03-05  4:29 ` [PATCH 2/7] mtd: orion_nand: " Jingoo Han
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:28 UTC (permalink / raw)
  To: 'David Woodhouse'; +Cc: 'Jingoo Han', linux-mtd

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/devices/docg3.c |   13 +------------
 drivers/mtd/nand/docg4.c    |   13 +------------
 2 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 8510ccb..a0cfa89 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -2144,18 +2144,7 @@ static struct platform_driver g3_driver = {
 	.remove		= __exit_p(docg3_release),
 };
 
-static int __init docg3_init(void)
-{
-	return platform_driver_probe(&g3_driver, docg3_probe);
-}
-module_init(docg3_init);
-
-
-static void __exit docg3_exit(void)
-{
-	platform_driver_unregister(&g3_driver);
-}
-module_exit(docg3_exit);
+module_platform_driver_probe(g3_driver, docg3_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index 18fa448..fa25e7a 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -1397,18 +1397,7 @@ static struct platform_driver docg4_driver = {
 	.remove		= __exit_p(cleanup_docg4),
 };
 
-static int __init docg4_init(void)
-{
-	return platform_driver_probe(&docg4_driver, probe_docg4);
-}
-
-static void __exit docg4_exit(void)
-{
-	platform_driver_unregister(&docg4_driver);
-}
-
-module_init(docg4_init);
-module_exit(docg4_exit);
+module_platform_driver_probe(docg4_driver, probe_docg4);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Mike Dunn");
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-13 11:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05  4:28 [PATCH 1/7] mtd: docg3: use module_platform_driver_probe() Jingoo Han
2013-03-05  4:29 ` [PATCH 2/7] mtd: orion_nand: " Jingoo Han
2013-03-05  4:30 ` [PATCH 3/7] mtd: atmel_nand: " Jingoo Han
2013-03-05  4:30 ` [PATCH 4/7] mtd: fsmc_nand: " Jingoo Han
2013-03-05  4:30 ` [PATCH 5/7] mtd: sh_flctl: " Jingoo Han
2013-03-05  4:31 ` [PATCH 6/7] mtd: txx9ndfmc: " Jingoo Han
2013-03-05  4:31 ` [PATCH 7/7] mtd: davinci_nand: " Jingoo Han
2013-03-13 11:32 ` [PATCH 1/7] mtd: docg3: " Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox