[MTD] Make functions static, include header files with prototypes

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>

authored by Adrian Bunk and committed by Thomas Gleixner 2b9175c1 ee2d49de

+11 -10
+2 -2
drivers/mtd/chips/cfi_probe.c
··· 1 1 /* 2 2 Common Flash Interface probe code. 3 3 (C) 2000 Red Hat. GPL'd. 4 - $Id: cfi_probe.c,v 1.85 2005/11/15 23:28:17 tpoynor Exp $ 4 + $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $ 5 5 */ 6 6 7 7 #include <linux/config.h> ··· 426 426 .module = THIS_MODULE 427 427 }; 428 428 429 - int __init cfi_probe_init(void) 429 + static int __init cfi_probe_init(void) 430 430 { 431 431 register_mtd_chip_driver(&cfi_chipdrv); 432 432 return 0;
+3 -3
drivers/mtd/devices/block2mtd.c
··· 1 1 /* 2 - * $Id: block2mtd.c,v 1.29 2005/11/07 11:14:24 gleixner Exp $ 2 + * $Id: block2mtd.c,v 1.30 2005/11/29 14:48:32 gleixner Exp $ 3 3 * 4 4 * block2mtd.c - create an mtd from a block device 5 5 * ··· 19 19 #include <linux/mtd/mtd.h> 20 20 #include <linux/buffer_head.h> 21 21 22 - #define VERSION "$Revision: 1.29 $" 22 + #define VERSION "$Revision: 1.30 $" 23 23 24 24 25 25 #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) ··· 40 40 41 41 42 42 #define PAGE_READAHEAD 64 43 - void cache_readahead(struct address_space *mapping, int index) 43 + static void cache_readahead(struct address_space *mapping, int index) 44 44 { 45 45 filler_t *filler = (filler_t*)mapping->a_ops->readpage; 46 46 int i, pagei;
+3 -3
drivers/mtd/ftl.c
··· 1 1 /* This version ported to the Linux-MTD system by dwmw2@infradead.org 2 - * $Id: ftl.c,v 1.58 2005/11/07 11:14:19 gleixner Exp $ 2 + * $Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $ 3 3 * 4 4 * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br> 5 5 * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups ··· 1084 1084 .owner = THIS_MODULE, 1085 1085 }; 1086 1086 1087 - int init_ftl(void) 1087 + static int init_ftl(void) 1088 1088 { 1089 - DEBUG(0, "$Id: ftl.c,v 1.58 2005/11/07 11:14:19 gleixner Exp $\n"); 1089 + DEBUG(0, "$Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $\n"); 1090 1090 1091 1091 return register_mtd_blktrans(&ftl_tr); 1092 1092 }
+2 -1
drivers/mtd/maps/physmap.c
··· 1 1 /* 2 - * $Id: physmap.c,v 1.38 2005/11/07 11:14:28 gleixner Exp $ 2 + * $Id: physmap.c,v 1.39 2005/11/29 14:49:36 gleixner Exp $ 3 3 * 4 4 * Normal mappings of chips in physical memory 5 5 * ··· 19 19 #include <linux/mtd/map.h> 20 20 #include <linux/config.h> 21 21 #include <linux/mtd/partitions.h> 22 + #include <linux/mtd/physmap.h> 22 23 23 24 static struct mtd_info *mymtd; 24 25
+1 -1
drivers/mtd/nand/nandsim.c
··· 1486 1486 /* 1487 1487 * Module initialization function 1488 1488 */ 1489 - int __init ns_init_module(void) 1489 + static int __init ns_init_module(void) 1490 1490 { 1491 1491 struct nand_chip *chip; 1492 1492 struct nandsim *nand;