mtd/drivers/mtd/devices blkmtd.c, 1.23, 1.24 doc2000.c, 1.63, 1.64 doc2001.c, 1.45, 1.46 doc2001plus.c, 1.10, 1.11 docprobe.c, 1.42, 1.43 mtdram.c, 1.33, 1.34 phram.c, 1.2, 1.3 pmc551.c, 1.28, 1.29 slram.c, 1.31, 1.32

David Woodhouse dwmw2 at infradead.org
Tue Nov 16 13:29:05 EST 2004


Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/tmp/cvs-serv30747/devices

Modified Files:
	blkmtd.c doc2000.c doc2001.c doc2001plus.c docprobe.c mtdram.c 
	phram.c pmc551.c slram.c 
Log Message:
Patch from Adrian Bunk <bunk at stusta.de> -- make a lot of code static.


Index: blkmtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- blkmtd.c	9 Aug 2004 14:03:19 -0000	1.23
+++ blkmtd.c	16 Nov 2004 18:29:01 -0000	1.24
@@ -59,10 +59,10 @@
 #define MAX_DEVICES 4
 
 /* Module parameters passed by insmod/modprobe */
-char *device[MAX_DEVICES];    /* the block device to use */
-int erasesz[MAX_DEVICES];     /* optional default erase size */
-int ro[MAX_DEVICES];          /* optional read only flag */
-int sync;
+static char *device[MAX_DEVICES];    /* the block device to use */
+static int erasesz[MAX_DEVICES];     /* optional default erase size */
+static int ro[MAX_DEVICES];          /* optional read only flag */
+static int sync;
 
 
 MODULE_LICENSE("GPL");

Index: doc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2000.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- doc2000.c	16 Sep 2004 23:51:56 -0000	1.63
+++ doc2000.c	16 Nov 2004 18:29:01 -0000	1.64
@@ -1276,7 +1276,7 @@
  *
  ****************************************************************************/
 
-int __init init_doc2000(void)
+static int __init init_doc2000(void)
 {
        inter_module_register(im_name, THIS_MODULE, &DoC2k_init);
        return 0;

Index: doc2001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- doc2001.c	16 Sep 2004 23:51:57 -0000	1.45
+++ doc2001.c	16 Nov 2004 18:29:01 -0000	1.46
@@ -856,7 +856,7 @@
  *
  ****************************************************************************/
 
-int __init init_doc2001(void)
+static int __init init_doc2001(void)
 {
 	inter_module_register(im_name, THIS_MODULE, &DoCMil_init);
 	return 0;

Index: doc2001plus.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001plus.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- doc2001plus.c	16 Sep 2004 23:51:57 -0000	1.10
+++ doc2001plus.c	16 Nov 2004 18:29:01 -0000	1.11
@@ -1122,7 +1122,7 @@
  *
  ****************************************************************************/
 
-int __init init_doc2001plus(void)
+static int __init init_doc2001plus(void)
 {
 	inter_module_register(im_name, THIS_MODULE, &DoCMilPlus_init);
 	return 0;

Index: docprobe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/docprobe.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- docprobe.c	16 Sep 2004 23:51:57 -0000	1.42
+++ docprobe.c	16 Nov 2004 18:29:01 -0000	1.43
@@ -328,7 +328,7 @@
  *
  ****************************************************************************/
 
-int __init init_doc(void)
+static int __init init_doc(void)
 {
 	int i;
 	

Index: mtdram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/mtdram.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- mtdram.c	9 Aug 2004 13:19:44 -0000	1.33
+++ mtdram.c	16 Nov 2004 18:29:01 -0000	1.34
@@ -153,7 +153,7 @@
 
 #if CONFIG_MTDRAM_TOTAL_SIZE > 0
 #if CONFIG_MTDRAM_ABS_POS > 0
-int __init init_mtdram(void)
+static int __init init_mtdram(void)
 {
   void *addr;
   int err;
@@ -186,7 +186,7 @@
 
 #else /* CONFIG_MTDRAM_ABS_POS > 0 */
 
-int __init init_mtdram(void)
+static int __init init_mtdram(void)
 {
   void *addr;
   int err;
@@ -220,7 +220,7 @@
 
 #else /* CONFIG_MTDRAM_TOTAL_SIZE > 0 */
 
-int __init init_mtdram(void)
+static int __init init_mtdram(void)
 {
   return 0;
 }

Index: phram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/phram.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- phram.c	9 Aug 2004 13:19:44 -0000	1.2
+++ phram.c	16 Nov 2004 18:29:01 -0000	1.3
@@ -39,7 +39,7 @@
 
 
 
-int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
+static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
 	u_char *start = (u_char *)mtd->priv;
 
@@ -60,7 +60,7 @@
 	return 0;
 }
 
-int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
+static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char **mtdbuf)
 {
 	u_char *start = (u_char *)mtd->priv;
@@ -73,11 +73,11 @@
 	return 0;
 }
 
-void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
+static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
 {
 }
 
-int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
+static int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char *buf)
 {
 	u_char *start = (u_char *)mtd->priv;
@@ -91,7 +91,7 @@
 	return 0;
 }
 
-int phram_write(struct mtd_info *mtd, loff_t to, size_t len,
+static int phram_write(struct mtd_info *mtd, loff_t to, size_t len,
 		size_t *retlen, const u_char *buf)
 {
 	u_char *start = (u_char *)mtd->priv;
@@ -340,7 +340,7 @@
 MODULE_PARM_DESC(slram, "List of memory regions to map. \"map=<name>,<start><length/end>\"");
 
 
-int __init init_phram(void)
+static int __init init_phram(void)
 {
 	printk(KERN_ERR "phram loaded\n");
 	return 0;

Index: pmc551.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/pmc551.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- pmc551.c	9 Aug 2004 13:19:44 -0000	1.28
+++ pmc551.c	16 Nov 2004 18:29:01 -0000	1.29
@@ -648,7 +648,7 @@
 /*
  * PMC551 Card Initialization
  */
-int __init init_pmc551(void)
+static int __init init_pmc551(void)
 {
         struct pci_dev *PCI_Device = NULL;
         struct mypriv *priv;

Index: slram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/slram.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- slram.c	9 Aug 2004 13:19:44 -0000	1.31
+++ slram.c	16 Nov 2004 18:29:01 -0000	1.32
@@ -75,13 +75,13 @@
 
 static slram_mtd_list_t *slram_mtdlist = NULL;
 
-int slram_erase(struct mtd_info *, struct erase_info *);
-int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **);
-void slram_unpoint(struct mtd_info *, u_char *, loff_t,	size_t);
-int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
-int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
+static int slram_erase(struct mtd_info *, struct erase_info *);
+static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **);
+static void slram_unpoint(struct mtd_info *, u_char *, loff_t,	size_t);
+static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
+static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
 
-int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
+static int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
 	slram_priv_t *priv = mtd->priv;
 
@@ -103,7 +103,7 @@
 	return(0);
 }
 
-int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
+static int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char **mtdbuf)
 {
 	slram_priv_t *priv = (slram_priv_t *)mtd->priv;
@@ -113,11 +113,11 @@
 	return(0);
 }
 
-void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
+static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
 {
 }
 
-int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
+static int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char *buf)
 {
 	slram_priv_t *priv = (slram_priv_t *)mtd->priv;
@@ -128,7 +128,7 @@
 	return(0);
 }
 
-int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
+static int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
 		size_t *retlen, const u_char *buf)
 {
 	slram_priv_t *priv = (slram_priv_t *)mtd->priv;
@@ -141,7 +141,7 @@
 
 /*====================================================================*/
 
-int register_device(char *name, unsigned long start, unsigned long length)
+static int register_device(char *name, unsigned long start, unsigned long length)
 {
 	slram_mtd_list_t **curmtd;
 
@@ -213,7 +213,7 @@
 	return(0);	
 }
 
-void unregister_devices(void)
+static void unregister_devices(void)
 {
 	slram_mtd_list_t *nextitem;
 
@@ -228,7 +228,7 @@
 	}
 }
 
-unsigned long handle_unit(unsigned long value, char *unit)
+static unsigned long handle_unit(unsigned long value, char *unit)
 {
 	if ((*unit == 'M') || (*unit == 'm')) {
 		return(value * 1024 * 1024);
@@ -238,7 +238,7 @@
 	return(value);
 }
 
-int parse_cmdline(char *devname, char *szstart, char *szlength)
+static int parse_cmdline(char *devname, char *szstart, char *szlength)
 {
 	char *buffer;
 	unsigned long devstart;
@@ -285,7 +285,7 @@
 
 #endif
 
-int init_slram(void)
+static int init_slram(void)
 {
 	char *devname;
 	int i;





More information about the linux-mtd-cvs mailing list