]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MTD] Make functions static, include header files with prototypes
authorAdrian Bunk <bunk@stusta.de>
Tue, 29 Nov 2005 14:49:38 +0000 (14:49 +0000)
committerThomas Gleixner <tglx@mtd.linutronix.de>
Tue, 29 Nov 2005 18:54:58 +0000 (19:54 +0100)
This patch contains the following possible cleanups:
- every file should #include the headers containing the prototypes for
  it's global functions
- make needlessly global functions static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/mtd/chips/cfi_probe.c
drivers/mtd/devices/block2mtd.c
drivers/mtd/ftl.c
drivers/mtd/maps/physmap.c
drivers/mtd/nand/nandsim.c

index d65ccdebbda40057ee12be6116e78e8c4d3e037f..e636aa86bc24825dca9278511e5c38e82a00f4fb 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Common Flash Interface probe code.
    (C) 2000 Red Hat. GPL'd.
-   $Id: cfi_probe.c,v 1.85 2005/11/15 23:28:17 tpoynor Exp $
+   $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $
 */
 
 #include <linux/config.h>
@@ -426,7 +426,7 @@ static struct mtd_chip_driver cfi_chipdrv = {
        .module         = THIS_MODULE
 };
 
-int __init cfi_probe_init(void)
+static int __init cfi_probe_init(void)
 {
        register_mtd_chip_driver(&cfi_chipdrv);
        return 0;
index 0aaa0ced9aba0acd7d5105d16a4fe90b4323be73..7ff403b2a0a056588ff97c3963211cc708ff0e98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: block2mtd.c,v 1.29 2005/11/07 11:14:24 gleixner Exp $
+ * $Id: block2mtd.c,v 1.30 2005/11/29 14:48:32 gleixner Exp $
  *
  * block2mtd.c - create an mtd from a block device
  *
@@ -19,7 +19,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/buffer_head.h>
 
-#define VERSION "$Revision: 1.29 $"
+#define VERSION "$Revision: 1.30 $"
 
 
 #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
@@ -40,7 +40,7 @@ static LIST_HEAD(blkmtd_device_list);
 
 
 #define PAGE_READAHEAD 64
-void cache_readahead(struct address_space *mapping, int index)
+static void cache_readahead(struct address_space *mapping, int index)
 {
        filler_t *filler = (filler_t*)mapping->a_ops->readpage;
        int i, pagei;
index de7e231d6d180deb3528caeb62593555ba09f363..8a878b34eca0b34c090f2ec41f6c72d41d4f307c 100644 (file)
@@ -1,5 +1,5 @@
 /* This version ported to the Linux-MTD system by dwmw2@infradead.org
- * $Id: ftl.c,v 1.58 2005/11/07 11:14:19 gleixner Exp $
+ * $Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $
  *
  * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups
@@ -1084,9 +1084,9 @@ struct mtd_blktrans_ops ftl_tr = {
        .owner          = THIS_MODULE,
 };
 
-int init_ftl(void)
+static int init_ftl(void)
 {
-       DEBUG(0, "$Id: ftl.c,v 1.58 2005/11/07 11:14:19 gleixner Exp $\n");
+       DEBUG(0, "$Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $\n");
 
        return register_mtd_blktrans(&ftl_tr);
 }
index 9ee760f97bc6ae58da80183fe3de17cdc77e80d4..f49ebc3c4606c89dbc60605cbbf31dd33a6bf93f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: physmap.c,v 1.38 2005/11/07 11:14:28 gleixner Exp $
+ * $Id: physmap.c,v 1.39 2005/11/29 14:49:36 gleixner Exp $
  *
  * Normal mappings of chips in physical memory
  *
@@ -19,6 +19,7 @@
 #include <linux/mtd/map.h>
 #include <linux/config.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
 
 static struct mtd_info *mymtd;
 
index de4500395300065d99e3489e4d445947c64b1fed..a0af92cc7efd787624f6848d93d618eca898ce84 100644 (file)
@@ -1486,7 +1486,7 @@ ns_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
 /*
  * Module initialization function
  */
-int __init ns_init_module(void)
+static int __init ns_init_module(void)
 {
        struct nand_chip *chip;
        struct nandsim *nand;