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

* [PATCH 2/7] mtd: orion_nand: use module_platform_driver_probe()
  2013-03-05  4:28 [PATCH 1/7] mtd: docg3: use module_platform_driver_probe() Jingoo Han
@ 2013-03-05  4:29 ` Jingoo Han
  2013-03-05  4:30 ` [PATCH 3/7] mtd: atmel_nand: " Jingoo Han
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:29 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/nand/orion_nand.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index cd72b92..8fbd002 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -231,18 +231,7 @@ static struct platform_driver orion_nand_driver = {
 	},
 };
 
-static int __init orion_nand_init(void)
-{
-	return platform_driver_probe(&orion_nand_driver, orion_nand_probe);
-}
-
-static void __exit orion_nand_exit(void)
-{
-	platform_driver_unregister(&orion_nand_driver);
-}
-
-module_init(orion_nand_init);
-module_exit(orion_nand_exit);
+module_platform_driver_probe(orion_nand_driver, orion_nand_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Tzachi Perelstein");
-- 
1.7.2.5

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

* [PATCH 3/7] mtd: atmel_nand: use module_platform_driver_probe()
  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 ` Jingoo Han
  2013-03-05  4:30 ` [PATCH 4/7] mtd: fsmc_nand: " Jingoo Han
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:30 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/nand/atmel_nand.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index ffcbcca..2d23d29 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1737,20 +1737,7 @@ static struct platform_driver atmel_nand_driver = {
 	},
 };
 
-static int __init atmel_nand_init(void)
-{
-	return platform_driver_probe(&atmel_nand_driver, atmel_nand_probe);
-}
-
-
-static void __exit atmel_nand_exit(void)
-{
-	platform_driver_unregister(&atmel_nand_driver);
-}
-
-
-module_init(atmel_nand_init);
-module_exit(atmel_nand_exit);
+module_platform_driver_probe(atmel_nand_driver, atmel_nand_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Rick Bronson");
-- 
1.7.2.5

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

* [PATCH 4/7] mtd: fsmc_nand: use module_platform_driver_probe()
  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 ` Jingoo Han
  2013-03-05  4:30 ` [PATCH 5/7] mtd: sh_flctl: " Jingoo Han
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:30 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/nand/fsmc_nand.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 05ba3f0..911e243 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -1235,18 +1235,7 @@ static struct platform_driver fsmc_nand_driver = {
 	},
 };
 
-static int __init fsmc_nand_init(void)
-{
-	return platform_driver_probe(&fsmc_nand_driver,
-				     fsmc_nand_probe);
-}
-module_init(fsmc_nand_init);
-
-static void __exit fsmc_nand_exit(void)
-{
-	platform_driver_unregister(&fsmc_nand_driver);
-}
-module_exit(fsmc_nand_exit);
+module_platform_driver_probe(fsmc_nand_driver, fsmc_nand_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Vipin Kumar <vipin.kumar@st.com>, Ashish Priyadarshi");
-- 
1.7.2.5

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

* [PATCH 5/7] mtd: sh_flctl: use module_platform_driver_probe()
  2013-03-05  4:28 [PATCH 1/7] mtd: docg3: use module_platform_driver_probe() Jingoo Han
                   ` (2 preceding siblings ...)
  2013-03-05  4:30 ` [PATCH 4/7] mtd: fsmc_nand: " Jingoo Han
@ 2013-03-05  4:30 ` Jingoo Han
  2013-03-05  4:31 ` [PATCH 6/7] mtd: txx9ndfmc: " Jingoo Han
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:30 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/nand/sh_flctl.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 57b3971..5899738 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -1223,18 +1223,7 @@ static struct platform_driver flctl_driver = {
 	},
 };
 
-static int __init flctl_nand_init(void)
-{
-	return platform_driver_probe(&flctl_driver, flctl_probe);
-}
-
-static void __exit flctl_nand_cleanup(void)
-{
-	platform_driver_unregister(&flctl_driver);
-}
-
-module_init(flctl_nand_init);
-module_exit(flctl_nand_cleanup);
+module_platform_driver_probe(flctl_driver, flctl_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Yoshihiro Shimoda");
-- 
1.7.2.5

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

* [PATCH 6/7] mtd: txx9ndfmc: use module_platform_driver_probe()
  2013-03-05  4:28 [PATCH 1/7] mtd: docg3: use module_platform_driver_probe() Jingoo Han
                   ` (3 preceding siblings ...)
  2013-03-05  4:30 ` [PATCH 5/7] mtd: sh_flctl: " Jingoo Han
@ 2013-03-05  4:31 ` 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
  6 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:31 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/nand/txx9ndfmc.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
index e1e8748..7ed654c 100644
--- a/drivers/mtd/nand/txx9ndfmc.c
+++ b/drivers/mtd/nand/txx9ndfmc.c
@@ -427,18 +427,7 @@ static struct platform_driver txx9ndfmc_driver = {
 	},
 };
 
-static int __init txx9ndfmc_init(void)
-{
-	return platform_driver_probe(&txx9ndfmc_driver, txx9ndfmc_probe);
-}
-
-static void __exit txx9ndfmc_exit(void)
-{
-	platform_driver_unregister(&txx9ndfmc_driver);
-}
-
-module_init(txx9ndfmc_init);
-module_exit(txx9ndfmc_exit);
+module_platform_driver_probe(txx9ndfmc_driver, txx9ndfmc_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("TXx9 SoC NAND flash controller driver");
-- 
1.7.2.5

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

* [PATCH 7/7] mtd: davinci_nand: use module_platform_driver_probe()
  2013-03-05  4:28 [PATCH 1/7] mtd: docg3: use module_platform_driver_probe() Jingoo Han
                   ` (4 preceding siblings ...)
  2013-03-05  4:31 ` [PATCH 6/7] mtd: txx9ndfmc: " Jingoo Han
@ 2013-03-05  4:31 ` Jingoo Han
  2013-03-13 11:32 ` [PATCH 1/7] mtd: docg3: " Artem Bityutskiy
  6 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2013-03-05  4:31 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/nand/davinci_nand.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 94e17af..864717b 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -883,17 +883,7 @@ static struct platform_driver nand_davinci_driver = {
 };
 MODULE_ALIAS("platform:davinci_nand");
 
-static int __init nand_davinci_init(void)
-{
-	return platform_driver_probe(&nand_davinci_driver, nand_davinci_probe);
-}
-module_init(nand_davinci_init);
-
-static void __exit nand_davinci_exit(void)
-{
-	platform_driver_unregister(&nand_davinci_driver);
-}
-module_exit(nand_davinci_exit);
+module_platform_driver_probe(nand_davinci_driver, nand_davinci_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Texas Instruments");
-- 
1.7.2.5

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

* Re: [PATCH 1/7] mtd: docg3: use module_platform_driver_probe()
  2013-03-05  4:28 [PATCH 1/7] mtd: docg3: use module_platform_driver_probe() Jingoo Han
                   ` (5 preceding siblings ...)
  2013-03-05  4:31 ` [PATCH 7/7] mtd: davinci_nand: " Jingoo Han
@ 2013-03-13 11:32 ` Artem Bityutskiy
  6 siblings, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2013-03-13 11:32 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-mtd, 'David Woodhouse'

On Tue, 2013-03-05 at 13:28 +0900, Jingoo Han wrote:
> This patch uses module_platform_driver_probe() macro which makes
> the code smaller and simpler.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[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