Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142333
b: refs/heads/master
c: 45b0907
h: refs/heads/master
i:
  142331: c4d2d13
v: v3
  • Loading branch information
Kevin Cernekee authored and David Woodhouse committed Apr 4, 2009
1 parent cc61ea8 commit 80106e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: c451c7c4c9c4f59c7808a7d397d32bef160c14d9
refs/heads/master: 45b09076149f1360e15919ca7e004e8d3810a0f7
9 changes: 6 additions & 3 deletions trunk/drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ 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 */

Expand All @@ -596,24 +598,25 @@ static int __init init_mtd(void)
pr_err("Error creating mtd class.\n");
return PTR_ERR(mtd_class);
}
#ifdef CONFIG_PROC_FS
if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
proc_mtd->read_proc = mtd_read_proc;
#endif /* CONFIG_PROC_FS */
return 0;
}

static void __exit cleanup_mtd(void)
{
#ifdef CONFIG_PROC_FS
if (proc_mtd)
remove_proc_entry( "mtd", NULL);
#endif /* CONFIG_PROC_FS */
class_destroy(mtd_class);
}

module_init(init_mtd);
module_exit(cleanup_mtd);

#endif /* CONFIG_PROC_FS */


MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_DESCRIPTION("Core MTD registration and access routines");

0 comments on commit 80106e2

Please sign in to comment.