Skip to content

Commit

Permalink
UBI: correct usage of IS_ENABLED()
Browse files Browse the repository at this point in the history
Commit "e9b4cf2 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: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Brian Norris authored and Artem Bityutskiy committed Jun 27, 2012
1 parent 2d4cf5a commit 903e0e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/mtd/ubi/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir;
*/
int ubi_debugfs_init(void)
{
if (!IS_ENABLED(DEBUG_FS))
if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0;

dfs_rootdir = debugfs_create_dir("ubi", NULL);
Expand All @@ -284,7 +284,7 @@ int ubi_debugfs_init(void)
*/
void ubi_debugfs_exit(void)
{
if (IS_ENABLED(DEBUG_FS))
if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove(dfs_rootdir);
}

Expand Down Expand Up @@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
struct dentry *dent;
struct ubi_debug_info *d = ubi->dbg;

if (!IS_ENABLED(DEBUG_FS))
if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0;

n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME,
Expand Down Expand Up @@ -477,6 +477,6 @@ int ubi_debugfs_init_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);
}

0 comments on commit 903e0e4

Please sign in to comment.