From: Adrian Bunk 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 Cc: David Woodhouse Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- drivers/mtd/chips/cfi_probe.c | 2 +- drivers/mtd/devices/block2mtd.c | 2 +- drivers/mtd/ftl.c | 2 +- drivers/mtd/maps/physmap.c | 1 + drivers/mtd/nand/nandsim.c | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff -puN drivers/mtd/chips/cfi_probe.c~drivers-mtd-possible-cleanups drivers/mtd/chips/cfi_probe.c --- devel/drivers/mtd/chips/cfi_probe.c~drivers-mtd-possible-cleanups 2005-11-09 19:19:29.000000000 -0800 +++ devel-akpm/drivers/mtd/chips/cfi_probe.c 2005-11-09 19:19:29.000000000 -0800 @@ -426,7 +426,7 @@ static struct mtd_chip_driver cfi_chipdr .module = THIS_MODULE }; -int __init cfi_probe_init(void) +static int __init cfi_probe_init(void) { register_mtd_chip_driver(&cfi_chipdrv); return 0; diff -puN drivers/mtd/devices/block2mtd.c~drivers-mtd-possible-cleanups drivers/mtd/devices/block2mtd.c --- devel/drivers/mtd/devices/block2mtd.c~drivers-mtd-possible-cleanups 2005-11-09 19:19:29.000000000 -0800 +++ devel-akpm/drivers/mtd/devices/block2mtd.c 2005-11-09 19:19:29.000000000 -0800 @@ -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; diff -puN drivers/mtd/ftl.c~drivers-mtd-possible-cleanups drivers/mtd/ftl.c --- devel/drivers/mtd/ftl.c~drivers-mtd-possible-cleanups 2005-11-09 19:19:29.000000000 -0800 +++ devel-akpm/drivers/mtd/ftl.c 2005-11-09 19:19:29.000000000 -0800 @@ -1084,7 +1084,7 @@ 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"); diff -puN drivers/mtd/maps/physmap.c~drivers-mtd-possible-cleanups drivers/mtd/maps/physmap.c --- devel/drivers/mtd/maps/physmap.c~drivers-mtd-possible-cleanups 2005-11-09 19:19:29.000000000 -0800 +++ devel-akpm/drivers/mtd/maps/physmap.c 2005-11-09 19:19:29.000000000 -0800 @@ -19,6 +19,7 @@ #include #include #include +#include static struct mtd_info *mymtd; diff -puN drivers/mtd/nand/nandsim.c~drivers-mtd-possible-cleanups drivers/mtd/nand/nandsim.c --- devel/drivers/mtd/nand/nandsim.c~drivers-mtd-possible-cleanups 2005-11-09 19:19:29.000000000 -0800 +++ devel-akpm/drivers/mtd/nand/nandsim.c 2005-11-09 19:19:29.000000000 -0800 @@ -1486,7 +1486,7 @@ ns_nand_verify_buf(struct mtd_info *mtd, /* * Module initialization function */ -int __init ns_init_module(void) +static int __init ns_init_module(void) { struct nand_chip *chip; struct nandsim *nand; _