[MTD NAND] Make various initfuncs static, remove #ifdef MODULE from exitfuncs

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue May 16 08:59:02 EDT 2006


Commit:     cead4dbc03ba6eb2e35bac04439b76a0cc2286ce
Parent:     ce589a0328866228412ea0df2c834688da8f4700
Author:     David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Tue May 16 13:54:50 2006 +0100
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue May 16 13:54:50 2006 +0100

    [MTD NAND] Make various initfuncs static, remove #ifdef MODULE from exitfuncs
    
    We all inherited the same error from the original NAND board driver which
    got copied and changed. Fix them all at once...
    
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>

 drivers/mtd/nand/au1550nd.c    |    4 +---
 drivers/mtd/nand/autcpu12.c    |    4 +---
 drivers/mtd/nand/cs553x_nand.c |    2 +-
 drivers/mtd/nand/rtc_from4.c   |    4 +---
 drivers/mtd/nand/sharpsl.c     |    4 +---
 drivers/mtd/nand/spia.c        |    4 +---
 drivers/mtd/nand/toto.c        |    2 +-
 7 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c
index 87d3435..861fb96 100644
--- a/drivers/mtd/nand/au1550nd.c
+++ b/drivers/mtd/nand/au1550nd.c
@@ -321,7 +321,7 @@ int au1550_device_ready(struct mtd_info 
 /*
  * Main initialization routine
  */
-int __init au1xxx_nand_init(void)
+static int __init au1xxx_nand_init(void)
 {
 	struct nand_chip *this;
 	u16 boot_swapboot = 0;	/* default value */
@@ -480,7 +480,6 @@ module_init(au1xxx_nand_init);
 /*
  * Clean up routine
  */
-#ifdef MODULE
 static void __exit au1550_cleanup(void)
 {
 	struct nand_chip *this = (struct nand_chip *)&au1550_mtd[1];
@@ -496,7 +495,6 @@ static void __exit au1550_cleanup(void)
 }
 
 module_exit(au1550_cleanup);
-#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Embedded Edge, LLC");
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index 330deb0..43b2960 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -124,7 +124,7 @@ int autcpu12_device_ready(struct mtd_inf
 /*
  * Main initialization routine
  */
-int __init autcpu12_init(void)
+static int __init autcpu12_init(void)
 {
 	struct nand_chip *this;
 	int err = 0;
@@ -203,7 +203,6 @@ module_init(autcpu12_init);
 /*
  * Clean up routine
  */
-#ifdef MODULE
 static void __exit autcpu12_cleanup(void)
 {
 	/* Release resources, unregister device */
@@ -217,7 +216,6 @@ static void __exit autcpu12_cleanup(void
 }
 
 module_exit(autcpu12_cleanup);
-#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Thomas Gleixner <tglx at linutronix.de>");
diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c
index d5b0551..bf25125 100644
--- a/drivers/mtd/nand/cs553x_nand.c
+++ b/drivers/mtd/nand/cs553x_nand.c
@@ -267,7 +267,7 @@ out:
 	return err;
 }
 
-int __init cs553x_init(void)
+static int __init cs553x_init(void)
 {
 	int err = -ENXIO;
 	int i;
diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c
index 0c56a66..bc9d849 100644
--- a/drivers/mtd/nand/rtc_from4.c
+++ b/drivers/mtd/nand/rtc_from4.c
@@ -516,7 +516,7 @@ #endif
 /*
  * Main initialization routine
  */
-int __init rtc_from4_init(void)
+static int __init rtc_from4_init(void)
 {
 	struct nand_chip *this;
 	unsigned short bcr1, bcr2, wcr2;
@@ -637,7 +637,6 @@ module_init(rtc_from4_init);
 /*
  * Clean up routine
  */
-#ifdef MODULE
 static void __exit rtc_from4_cleanup(void)
 {
 	/* Release resource, unregister partitions */
@@ -655,7 +654,6 @@ #endif
 }
 
 module_exit(rtc_from4_cleanup);
-#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("d.marlin <dmarlin at redhat.com");
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index d375cb3..60e10c0 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -155,7 +155,7 @@ #endif
 /*
  * Main initialization routine
  */
-int __init sharpsl_nand_init(void)
+static int __init sharpsl_nand_init(void)
 {
 	struct nand_chip *this;
 	struct mtd_partition *sharpsl_partition_info;
@@ -257,7 +257,6 @@ module_init(sharpsl_nand_init);
 /*
  * Clean up routine
  */
-#ifdef MODULE
 static void __exit sharpsl_nand_cleanup(void)
 {
 	struct nand_chip *this = (struct nand_chip *)&sharpsl_mtd[1];
@@ -272,7 +271,6 @@ static void __exit sharpsl_nand_cleanup(
 }
 
 module_exit(sharpsl_nand_cleanup);
-#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Richard Purdie <rpurdie at rpsys.net>");
diff --git a/drivers/mtd/nand/spia.c b/drivers/mtd/nand/spia.c
index b06aada..9737f1d 100644
--- a/drivers/mtd/nand/spia.c
+++ b/drivers/mtd/nand/spia.c
@@ -101,7 +101,7 @@ static void spia_hwcontrol(struct mtd_in
 /*
  * Main initialization routine
  */
-int __init spia_init(void)
+static int __init spia_init(void)
 {
 	struct nand_chip *this;
 
@@ -155,7 +155,6 @@ module_init(spia_init);
 /*
  * Clean up routine
  */
-#ifdef MODULE
 static void __exit spia_cleanup(void)
 {
 	/* Release resources, unregister device */
@@ -166,7 +165,6 @@ static void __exit spia_cleanup(void)
 }
 
 module_exit(spia_cleanup);
-#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Steven J. Hill <sjhill at realitydiluted.com");
diff --git a/drivers/mtd/nand/toto.c b/drivers/mtd/nand/toto.c
index 24cfa9e..c51c895 100644
--- a/drivers/mtd/nand/toto.c
+++ b/drivers/mtd/nand/toto.c
@@ -115,7 +115,7 @@ static void toto_hwcontrol(struct mtd_in
 /*
  * Main initialization routine
  */
-int __init toto_init(void)
+static int __init toto_init(void)
 {
 	struct nand_chip *this;
 	int err = 0;



More information about the linux-mtd-cvs mailing list