提交 903e0e4e 编写于 作者: B Brian Norris 提交者: Artem Bityutskiy

UBI: correct usage of IS_ENABLED()

Commit "e9b4cf20 UBI: fix debugfs-less systems support" fixed one
regression but introduced a different regression - the debugfs is now always
compiled out. Root cause: IS_ENABLED() arguments should be used with the
CONFIG_* prefix.
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
上级 2d4cf5ae
...@@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir; ...@@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir;
*/ */
int ubi_debugfs_init(void) int ubi_debugfs_init(void)
{ {
if (!IS_ENABLED(DEBUG_FS)) if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0; return 0;
dfs_rootdir = debugfs_create_dir("ubi", NULL); dfs_rootdir = debugfs_create_dir("ubi", NULL);
...@@ -284,7 +284,7 @@ int ubi_debugfs_init(void) ...@@ -284,7 +284,7 @@ int ubi_debugfs_init(void)
*/ */
void ubi_debugfs_exit(void) void ubi_debugfs_exit(void)
{ {
if (IS_ENABLED(DEBUG_FS)) if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove(dfs_rootdir); debugfs_remove(dfs_rootdir);
} }
...@@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi) ...@@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
struct dentry *dent; struct dentry *dent;
struct ubi_debug_info *d = ubi->dbg; struct ubi_debug_info *d = ubi->dbg;
if (!IS_ENABLED(DEBUG_FS)) if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0; return 0;
n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME, n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME,
...@@ -477,6 +477,6 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi) ...@@ -477,6 +477,6 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
*/ */
void ubi_debugfs_exit_dev(struct ubi_device *ubi) void ubi_debugfs_exit_dev(struct ubi_device *ubi)
{ {
if (IS_ENABLED(DEBUG_FS)) if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove_recursive(ubi->dbg->dfs_dir); debugfs_remove_recursive(ubi->dbg->dfs_dir);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册