mtd/drivers/mtd mtdcore.c,1.48,1.49

David Woodhouse dwmw2 at infradead.org
Wed Mar 29 03:40:16 EST 2006


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

Modified Files:
	mtdcore.c 
Log Message:
From: Pavel Machek <pavel at ucw.cz>

Kill unnecessary ifdefs in mtdcore.c.

(Fixed up by Adrian Bunk)

Signed-off-by: Pavel Machek <pavel at suse.cz>
Cc: Thomas Gleixner <tglx at linutronix.de>
Signed-off-by: Adrian Bunk <bunk at stusta.de>
Signed-off-by: Andrew Morton <akpm at osdl.org>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>



Index: mtdcore.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdcore.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- mtdcore.c	29 Mar 2006 08:26:27 -0000	1.48
+++ mtdcore.c	29 Mar 2006 08:40:13 -0000	1.49
@@ -19,9 +19,7 @@
 #include <linux/ioctl.h>
 #include <linux/init.h>
 #include <linux/mtd/compatmac.h>
-#ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
-#endif
 
 #include <linux/mtd/mtd.h>
 
@@ -296,10 +294,11 @@
 EXPORT_SYMBOL(default_mtd_writev);
 EXPORT_SYMBOL(default_mtd_readv);
 
+#ifdef CONFIG_PROC_FS
+
 /*====================================================================*/
 /* Support for /proc/mtd */
 
-#ifdef CONFIG_PROC_FS
 static struct proc_dir_entry *proc_mtd;
 
 static inline int mtd_proc_info (char *buf, int i)
@@ -344,31 +343,27 @@
         return ((count < begin+len-off) ? count : begin+len-off);
 }
 
-#endif /* CONFIG_PROC_FS */
-
 /*====================================================================*/
 /* Init code */
 
 static int __init init_mtd(void)
 {
-#ifdef CONFIG_PROC_FS
 	if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
 		proc_mtd->read_proc = mtd_read_proc;
-#endif
 	return 0;
 }
 
 static void __exit cleanup_mtd(void)
 {
-#ifdef CONFIG_PROC_FS
         if (proc_mtd)
 		remove_proc_entry( "mtd", NULL);
-#endif
 }
 
 module_init(init_mtd);
 module_exit(cleanup_mtd);
 
+#endif /* CONFIG_PROC_FS */
+
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Woodhouse <dwmw2 at infradead.org>");





More information about the linux-mtd-cvs mailing list