mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 23:00:21 +00:00
[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>
This commit is contained in:
parent
8b68a12633
commit
2d2dce0eb6
@ -19,9 +19,7 @@
|
|||||||
#include <linux/ioctl.h>
|
#include <linux/ioctl.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/mtd/compatmac.h>
|
#include <linux/mtd/compatmac.h>
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
|
|
||||||
@ -296,10 +294,11 @@ EXPORT_SYMBOL(unregister_mtd_user);
|
|||||||
EXPORT_SYMBOL(default_mtd_writev);
|
EXPORT_SYMBOL(default_mtd_writev);
|
||||||
EXPORT_SYMBOL(default_mtd_readv);
|
EXPORT_SYMBOL(default_mtd_readv);
|
||||||
|
|
||||||
|
#ifdef CONFIG_PROC_FS
|
||||||
|
|
||||||
/*====================================================================*/
|
/*====================================================================*/
|
||||||
/* Support for /proc/mtd */
|
/* Support for /proc/mtd */
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
static struct proc_dir_entry *proc_mtd;
|
static struct proc_dir_entry *proc_mtd;
|
||||||
|
|
||||||
static inline int mtd_proc_info (char *buf, int i)
|
static inline int mtd_proc_info (char *buf, int i)
|
||||||
@ -344,31 +343,27 @@ done:
|
|||||||
return ((count < begin+len-off) ? count : begin+len-off);
|
return ((count < begin+len-off) ? count : begin+len-off);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PROC_FS */
|
|
||||||
|
|
||||||
/*====================================================================*/
|
/*====================================================================*/
|
||||||
/* Init code */
|
/* Init code */
|
||||||
|
|
||||||
static int __init init_mtd(void)
|
static int __init init_mtd(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
|
if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
|
||||||
proc_mtd->read_proc = mtd_read_proc;
|
proc_mtd->read_proc = mtd_read_proc;
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit cleanup_mtd(void)
|
static void __exit cleanup_mtd(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
if (proc_mtd)
|
if (proc_mtd)
|
||||||
remove_proc_entry( "mtd", NULL);
|
remove_proc_entry( "mtd", NULL);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(init_mtd);
|
module_init(init_mtd);
|
||||||
module_exit(cleanup_mtd);
|
module_exit(cleanup_mtd);
|
||||||
|
|
||||||
|
#endif /* CONFIG_PROC_FS */
|
||||||
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
|
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user