summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-03-15 12:56:05 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-04-05 13:15:31 +0100
commit93e562141ac58452bcea48718af92cc62a20669d (patch)
treeed99ba0b39f489c74f8d77a6b7c3168b26a7c6a3 /drivers/mtd
parentc188a141672e4e3d6428ba53c9b709b8b631d8d5 (diff)
downloadlinux-stable-93e562141ac58452bcea48718af92cc62a20669d.tar.gz
linux-stable-93e562141ac58452bcea48718af92cc62a20669d.tar.bz2
linux-stable-93e562141ac58452bcea48718af92cc62a20669d.zip
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: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdcore.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 681bb6de6ff9..91c2efd22e1f 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1116,8 +1116,6 @@ EXPORT_SYMBOL_GPL(mtd_kmalloc_up_to);
/*====================================================================*/
/* Support for /proc/mtd */
-static struct proc_dir_entry *proc_mtd;
-
static int mtd_proc_show(struct seq_file *m, void *v)
{
struct mtd_info *mtd;
@@ -1163,6 +1161,8 @@ static int __init mtd_bdi_init(struct backing_dev_info *bdi, const char *name)
return ret;
}
+static struct proc_dir_entry *proc_mtd;
+
static int __init init_mtd(void)
{
int ret;
@@ -1183,9 +1183,8 @@ static int __init init_mtd(void)
if (ret)
goto err_bdi3;
-#ifdef CONFIG_PROC_FS
proc_mtd = proc_create("mtd", 0, NULL, &mtd_proc_ops);
-#endif /* CONFIG_PROC_FS */
+
return 0;
err_bdi3:
@@ -1201,10 +1200,8 @@ err_reg:
static void __exit cleanup_mtd(void)
{
-#ifdef CONFIG_PROC_FS
if (proc_mtd)
- remove_proc_entry( "mtd", NULL);
-#endif /* CONFIG_PROC_FS */
+ remove_proc_entry("mtd", NULL);
class_unregister(&mtd_class);
bdi_destroy(&mtd_bdi_unmappable);
bdi_destroy(&mtd_bdi_ro_mappable);