提交 93e56214 编写于 作者: A Artem Bityutskiy 提交者: David Woodhouse

mtd: mtdcore: remove few useless #ifdef's

Remove a couple of useles '#ifdef CONFIG_PROC_FS's around procfs functions
which anyway turn into empty function in 'proc_fs.h' file when CONFIG_PROC_FS
is not defined.
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 c188a141
...@@ -1116,8 +1116,6 @@ EXPORT_SYMBOL_GPL(mtd_kmalloc_up_to); ...@@ -1116,8 +1116,6 @@ EXPORT_SYMBOL_GPL(mtd_kmalloc_up_to);
/*====================================================================*/ /*====================================================================*/
/* Support for /proc/mtd */ /* Support for /proc/mtd */
static struct proc_dir_entry *proc_mtd;
static int mtd_proc_show(struct seq_file *m, void *v) static int mtd_proc_show(struct seq_file *m, void *v)
{ {
struct mtd_info *mtd; struct mtd_info *mtd;
...@@ -1163,6 +1161,8 @@ static int __init mtd_bdi_init(struct backing_dev_info *bdi, const char *name) ...@@ -1163,6 +1161,8 @@ static int __init mtd_bdi_init(struct backing_dev_info *bdi, const char *name)
return ret; return ret;
} }
static struct proc_dir_entry *proc_mtd;
static int __init init_mtd(void) static int __init init_mtd(void)
{ {
int ret; int ret;
...@@ -1183,9 +1183,8 @@ static int __init init_mtd(void) ...@@ -1183,9 +1183,8 @@ static int __init init_mtd(void)
if (ret) if (ret)
goto err_bdi3; goto err_bdi3;
#ifdef CONFIG_PROC_FS
proc_mtd = proc_create("mtd", 0, NULL, &mtd_proc_ops); proc_mtd = proc_create("mtd", 0, NULL, &mtd_proc_ops);
#endif /* CONFIG_PROC_FS */
return 0; return 0;
err_bdi3: err_bdi3:
...@@ -1201,10 +1200,8 @@ static int __init init_mtd(void) ...@@ -1201,10 +1200,8 @@ static int __init init_mtd(void)
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 /* CONFIG_PROC_FS */
class_unregister(&mtd_class); class_unregister(&mtd_class);
bdi_destroy(&mtd_bdi_unmappable); bdi_destroy(&mtd_bdi_unmappable);
bdi_destroy(&mtd_bdi_ro_mappable); bdi_destroy(&mtd_bdi_ro_mappable);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册