diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-03-15 06:56:05 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 08:15:31 -0400 |
commit | 93e562141ac58452bcea48718af92cc62a20669d (patch) | |
tree | ed99ba0b39f489c74f8d77a6b7c3168b26a7c6a3 /drivers/mtd | |
parent | c188a141672e4e3d6428ba53c9b709b8b631d8d5 (diff) |
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.c | 11 |
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); | |||
1116 | /*====================================================================*/ | 1116 | /*====================================================================*/ |
1117 | /* Support for /proc/mtd */ | 1117 | /* Support for /proc/mtd */ |
1118 | 1118 | ||
1119 | static struct proc_dir_entry *proc_mtd; | ||
1120 | |||
1121 | static int mtd_proc_show(struct seq_file *m, void *v) | 1119 | static int mtd_proc_show(struct seq_file *m, void *v) |
1122 | { | 1120 | { |
1123 | struct mtd_info *mtd; | 1121 | struct mtd_info *mtd; |
@@ -1163,6 +1161,8 @@ static int __init mtd_bdi_init(struct backing_dev_info *bdi, const char *name) | |||
1163 | return ret; | 1161 | return ret; |
1164 | } | 1162 | } |
1165 | 1163 | ||
1164 | static struct proc_dir_entry *proc_mtd; | ||
1165 | |||
1166 | static int __init init_mtd(void) | 1166 | static int __init init_mtd(void) |
1167 | { | 1167 | { |
1168 | int ret; | 1168 | int ret; |
@@ -1183,9 +1183,8 @@ static int __init init_mtd(void) | |||
1183 | if (ret) | 1183 | if (ret) |
1184 | goto err_bdi3; | 1184 | goto err_bdi3; |
1185 | 1185 | ||
1186 | #ifdef CONFIG_PROC_FS | ||
1187 | proc_mtd = proc_create("mtd", 0, NULL, &mtd_proc_ops); | 1186 | proc_mtd = proc_create("mtd", 0, NULL, &mtd_proc_ops); |
1188 | #endif /* CONFIG_PROC_FS */ | 1187 | |
1189 | return 0; | 1188 | return 0; |
1190 | 1189 | ||
1191 | err_bdi3: | 1190 | err_bdi3: |
@@ -1201,10 +1200,8 @@ err_reg: | |||
1201 | 1200 | ||
1202 | static void __exit cleanup_mtd(void) | 1201 | static void __exit cleanup_mtd(void) |
1203 | { | 1202 | { |
1204 | #ifdef CONFIG_PROC_FS | ||
1205 | if (proc_mtd) | 1203 | if (proc_mtd) |
1206 | remove_proc_entry( "mtd", NULL); | 1204 | remove_proc_entry("mtd", NULL); |
1207 | #endif /* CONFIG_PROC_FS */ | ||
1208 | class_unregister(&mtd_class); | 1205 | class_unregister(&mtd_class); |
1209 | bdi_destroy(&mtd_bdi_unmappable); | 1206 | bdi_destroy(&mtd_bdi_unmappable); |
1210 | bdi_destroy(&mtd_bdi_ro_mappable); | 1207 | bdi_destroy(&mtd_bdi_ro_mappable); |