Skip to contentSkip to conversation

drivers/mtd/: possible cleanups

PATCH New Adrian Bunk 1 participant 1 message Nov 8, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/mtd/: possible cleanups

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

---

This patch was already sent on:
- 5 Nov 2005

 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(-)
drivers/mtd/ftl.c renamed from drivers/mtd/ftl.c.old +1 -1
@@ -1084,7 +1084,7 @@
 	.owner		= THIS_MODULE,
 };
 
-int init_ftl(void)
+static int init_ftl(void)
 {
 	DEBUG(0, "$Id: ftl.c,v 1.55 2005/01/17 13:47:21 hvr Exp $\n");
 
drivers/mtd/chips/cfi_probe.c renamed from drivers/mtd/chips/cfi_probe.c.old +1 -1
@@ -426,7 +426,7 @@
 	.module		= THIS_MODULE
 };
 
-int __init cfi_probe_init(void)
+static int __init cfi_probe_init(void)
 {
 	register_mtd_chip_driver(&cfi_chipdrv);
 	return 0;
drivers/mtd/devices/block2mtd.c renamed from drivers/mtd/devices/block2mtd.c.old +1 -1
@@ -40,7 +40,7 @@
 
 
 #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;
drivers/mtd/maps/physmap.c renamed from drivers/mtd/maps/physmap.c.old +1 -0
@@ -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;
 
drivers/mtd/nand/nandsim.c renamed from drivers/mtd/nand/nandsim.c.old +1 -1
@@ -1486,7 +1486,7 @@
 /*
  * Module initialization function
  */
-int __init ns_init_module(void)
+static int __init ns_init_module(void)
 {
 	struct nand_chip *chip;
 	struct nandsim *nand;