Skip to contentSkip to conversation

mtd: docg3: use module_platform_driver_probe()

PATCH Applied Jingoo Han 2 participants 8 messages Mar 5, 2013 – Mar 13, 2013

Subsystems (4)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/7 mtd: docg3: use module_platform_driver_probe()

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

---
 drivers/mtd/devices/docg3.c |   13 +------------
 drivers/mtd/nand/docg4.c    |   13 +------------
 2 files changed, 2 insertions(+), 24 deletions(-)
drivers/mtd/devices/docg3.c +1 -12
index 8510ccb..a0cfa89 100644
@@ -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 <[email protected]>");
drivers/mtd/nand/docg4.c +1 -12
index 18fa448..fa25e7a 100644
@@ -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");
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/7 mtd: orion_nand: use module_platform_driver_probe()

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

---
 drivers/mtd/nand/orion_nand.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mtd/nand/orion_nand.c +1 -12
index cd72b92..8fbd002 100644
@@ -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");
Signature · 1 line
1.7.2.5
author
#2 lore raw

PATCH 3/7 mtd: atmel_nand: use module_platform_driver_probe()

In reply to Jingoo Han

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

---
 drivers/mtd/nand/atmel_nand.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
drivers/mtd/nand/atmel_nand.c +1 -14
index ffcbcca..2d23d29 100644
@@ -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");
Signature · 1 line
1.7.2.5
author
#3 lore raw

PATCH 4/7 mtd: fsmc_nand: use module_platform_driver_probe()

In reply to Jingoo Han

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

---
 drivers/mtd/nand/fsmc_nand.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mtd/nand/fsmc_nand.c +1 -12
index 05ba3f0..911e243 100644
@@ -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 <[email protected]>, Ashish Priyadarshi");
Signature · 1 line
1.7.2.5
author
#4 lore raw

PATCH 5/7 mtd: sh_flctl: use module_platform_driver_probe()

In reply to Jingoo Han

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

---
 drivers/mtd/nand/sh_flctl.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mtd/nand/sh_flctl.c +1 -12
index 57b3971..5899738 100644
@@ -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");
Signature · 1 line
1.7.2.5
author
#5 lore raw

PATCH 6/7 mtd: txx9ndfmc: use module_platform_driver_probe()

In reply to Jingoo Han

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

---
 drivers/mtd/nand/txx9ndfmc.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mtd/nand/txx9ndfmc.c +1 -12
index e1e8748..7ed654c 100644
@@ -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");
Signature · 1 line
1.7.2.5
author
#6 lore raw

PATCH 7/7 mtd: davinci_nand: use module_platform_driver_probe()

In reply to Jingoo Han

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

---
 drivers/mtd/nand/davinci_nand.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/mtd/nand/davinci_nand.c +1 -11
index 94e17af..864717b 100644
@@ -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");
Signature · 1 line
1.7.2.5