Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24842
b: refs/heads/master
c: 2d2dce0
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Machek authored and Linus Torvalds committed Mar 31, 2006
1 parent d4d7aeb commit c6b8b12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b68a1263305d4e8a07d8a43c996969ea9e44292
refs/heads/master: 2d2dce0eb650831046316a9cd091ea5257aa7d4b
13 changes: 4 additions & 9 deletions trunk/drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 <dwmw2@infradead.org>");
Expand Down

0 comments on commit c6b8b12

Please sign in to comment.