forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kill unneccessary ifdefs in mtdcore.c. Signed-off-by: Pavel Machek <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Adrian Bunk <[email protected]> Acked-by: David Woodhouse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
1 parent
8b68a12
commit 2d2dce0
Showing
1 changed file
with
4 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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(unregister_mtd_user); | |
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 @@ static int mtd_read_proc (char *page, char **start, off_t off, int count, | |
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 <[email protected]>"); | ||
|