diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-14 18:22:32 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-04-14 22:04:19 -0400 |
commit | 61f919a12fbdc3fd20f980a34a118d597198a392 (patch) | |
tree | 0c8ee118fabb29ff2c0be699948cb4b00627b543 | |
parent | 6d723736e472f7a0cd5b62c84152fceead241328 (diff) |
tracing/events: fix compile for modules disabled
Impact: compile fix
The addition of TRACE_EVENT for modules breaks the build for when
modules are disabled. This code fixes that.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | kernel/trace/trace_events.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index a4b177720a6c..6591d83e1e7a 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -797,6 +797,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events) | |||
797 | (unsigned long)event < (unsigned long)end; \ | 797 | (unsigned long)event < (unsigned long)end; \ |
798 | event++) | 798 | event++) |
799 | 799 | ||
800 | #ifdef CONFIG_MODULES | ||
800 | static void trace_module_add_events(struct module *mod) | 801 | static void trace_module_add_events(struct module *mod) |
801 | { | 802 | { |
802 | struct ftrace_event_call *call, *start, *end; | 803 | struct ftrace_event_call *call, *start, *end; |
@@ -840,8 +841,8 @@ static void trace_module_remove_events(struct module *mod) | |||
840 | } | 841 | } |
841 | } | 842 | } |
842 | 843 | ||
843 | int trace_module_notify(struct notifier_block *self, | 844 | static int trace_module_notify(struct notifier_block *self, |
844 | unsigned long val, void *data) | 845 | unsigned long val, void *data) |
845 | { | 846 | { |
846 | struct module *mod = data; | 847 | struct module *mod = data; |
847 | 848 | ||
@@ -858,6 +859,13 @@ int trace_module_notify(struct notifier_block *self, | |||
858 | 859 | ||
859 | return 0; | 860 | return 0; |
860 | } | 861 | } |
862 | #else | ||
863 | static int trace_module_notify(struct notifier_block *self, | ||
864 | unsigned long val, void *data) | ||
865 | { | ||
866 | return 0; | ||
867 | } | ||
868 | #endif /* CONFIG_MODULES */ | ||
861 | 869 | ||
862 | struct notifier_block trace_module_nb = { | 870 | struct notifier_block trace_module_nb = { |
863 | .notifier_call = trace_module_notify, | 871 | .notifier_call = trace_module_notify, |