diff options
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index d3b4bdf00b39..5bad9cbbf974 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -987,23 +987,21 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
987 | id); | 987 | id); |
988 | #endif | 988 | #endif |
989 | 989 | ||
990 | if (call->class->define_fields) { | 990 | /* |
991 | /* | 991 | * Other events may have the same class. Only update |
992 | * Other events may have the same class. Only update | 992 | * the fields if they are not already defined. |
993 | * the fields if they are not already defined. | 993 | */ |
994 | */ | 994 | head = trace_get_fields(call); |
995 | head = trace_get_fields(call); | 995 | if (list_empty(head)) { |
996 | if (list_empty(head)) { | 996 | ret = call->class->define_fields(call); |
997 | ret = call->class->define_fields(call); | 997 | if (ret < 0) { |
998 | if (ret < 0) { | 998 | pr_warning("Could not initialize trace point" |
999 | pr_warning("Could not initialize trace point" | 999 | " events/%s\n", call->name); |
1000 | " events/%s\n", call->name); | 1000 | return ret; |
1001 | return ret; | ||
1002 | } | ||
1003 | } | 1001 | } |
1004 | trace_create_file("filter", 0644, call->dir, call, | ||
1005 | filter); | ||
1006 | } | 1002 | } |
1003 | trace_create_file("filter", 0644, call->dir, call, | ||
1004 | filter); | ||
1007 | 1005 | ||
1008 | trace_create_file("format", 0444, call->dir, call, | 1006 | trace_create_file("format", 0444, call->dir, call, |
1009 | format); | 1007 | format); |