Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213449
b: refs/heads/master
c: 6a5c083
h: refs/heads/master
i:
  213447: 557c4f5
v: v3
  • Loading branch information
Thomas Renninger authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 0dce208 commit 56aa033
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a648ec05bb950fae2f35d0490ddd6cf15010af72
refs/heads/master: 6a5c083de2f5fbf89a4b0a251be2c2205434d7ea
33 changes: 23 additions & 10 deletions trunk/lib/dynamic_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,14 @@ static void ddebug_remove_all_tables(void)
mutex_unlock(&ddebug_lock);
}

static int __init dynamic_debug_init(void)
static __initdata int ddebug_init_success;

static int __init dynamic_debug_init_debugfs(void)
{
struct dentry *dir, *file;
struct _ddebug *iter, *iter_start;
const char *modname = NULL;
int ret = 0;
int n = 0;

if (!ddebug_init_success)
return -ENODEV;

dir = debugfs_create_dir("dynamic_debug", NULL);
if (!dir)
Expand All @@ -765,6 +766,16 @@ static int __init dynamic_debug_init(void)
debugfs_remove(dir);
return -ENOMEM;
}
return 0;
}

static int __init dynamic_debug_init(void)
{
struct _ddebug *iter, *iter_start;
const char *modname = NULL;
int ret = 0;
int n = 0;

if (__start___verbose != __stop___verbose) {
iter = __start___verbose;
modname = iter->modname;
Expand Down Expand Up @@ -795,11 +806,13 @@ static int __init dynamic_debug_init(void)
}

out_free:
if (ret) {
if (ret)
ddebug_remove_all_tables();
debugfs_remove(dir);
debugfs_remove(file);
}
else
ddebug_init_success = 1;
return 0;
}
module_init(dynamic_debug_init);
/* Allow early initialization for boot messages via boot param */
arch_initcall(dynamic_debug_init);
/* Debugfs setup must be done later */
module_init(dynamic_debug_init_debugfs);

0 comments on commit 56aa033

Please sign in to comment.