aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdcore.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2006-03-31 05:29:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 15:18:49 -0500
commit2d2dce0eb650831046316a9cd091ea5257aa7d4b (patch)
tree6eb57d7a6071646472b1ee0d33c685ec465af336 /drivers/mtd/mtdcore.c
parent8b68a1263305d4e8a07d8a43c996969ea9e44292 (diff)
[PATCH] Kill ifdefs in mtdcore.c
Kill unneccessary ifdefs in mtdcore.c. Signed-off-by: Pavel Machek <pavel@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r--drivers/mtd/mtdcore.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 9c3813486a1a..9905870f56e5 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -19,9 +19,7 @@
19#include <linux/ioctl.h> 19#include <linux/ioctl.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/mtd/compatmac.h> 21#include <linux/mtd/compatmac.h>
22#ifdef CONFIG_PROC_FS
23#include <linux/proc_fs.h> 22#include <linux/proc_fs.h>
24#endif
25 23
26#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
27 25
@@ -296,10 +294,11 @@ EXPORT_SYMBOL(unregister_mtd_user);
296EXPORT_SYMBOL(default_mtd_writev); 294EXPORT_SYMBOL(default_mtd_writev);
297EXPORT_SYMBOL(default_mtd_readv); 295EXPORT_SYMBOL(default_mtd_readv);
298 296
297#ifdef CONFIG_PROC_FS
298
299/*====================================================================*/ 299/*====================================================================*/
300/* Support for /proc/mtd */ 300/* Support for /proc/mtd */
301 301
302#ifdef CONFIG_PROC_FS
303static struct proc_dir_entry *proc_mtd; 302static struct proc_dir_entry *proc_mtd;
304 303
305static inline int mtd_proc_info (char *buf, int i) 304static inline int mtd_proc_info (char *buf, int i)
@@ -344,31 +343,27 @@ done:
344 return ((count < begin+len-off) ? count : begin+len-off); 343 return ((count < begin+len-off) ? count : begin+len-off);
345} 344}
346 345
347#endif /* CONFIG_PROC_FS */
348
349/*====================================================================*/ 346/*====================================================================*/
350/* Init code */ 347/* Init code */
351 348
352static int __init init_mtd(void) 349static int __init init_mtd(void)
353{ 350{
354#ifdef CONFIG_PROC_FS
355 if ((proc_mtd = create_proc_entry( "mtd", 0, NULL ))) 351 if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
356 proc_mtd->read_proc = mtd_read_proc; 352 proc_mtd->read_proc = mtd_read_proc;
357#endif
358 return 0; 353 return 0;
359} 354}
360 355
361static void __exit cleanup_mtd(void) 356static void __exit cleanup_mtd(void)
362{ 357{
363#ifdef CONFIG_PROC_FS
364 if (proc_mtd) 358 if (proc_mtd)
365 remove_proc_entry( "mtd", NULL); 359 remove_proc_entry( "mtd", NULL);
366#endif
367} 360}
368 361
369module_init(init_mtd); 362module_init(init_mtd);
370module_exit(cleanup_mtd); 363module_exit(cleanup_mtd);
371 364
365#endif /* CONFIG_PROC_FS */
366
372 367
373MODULE_LICENSE("GPL"); 368MODULE_LICENSE("GPL");
374MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); 369MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");