Skip to content

Commit

Permalink
tracing/events: fix compile for modules disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Apr 15, 2009
1 parent 6d72373 commit 61f919a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events)
(unsigned long)event < (unsigned long)end; \
event++)

#ifdef CONFIG_MODULES
static void trace_module_add_events(struct module *mod)
{
struct ftrace_event_call *call, *start, *end;
Expand Down Expand Up @@ -840,8 +841,8 @@ static void trace_module_remove_events(struct module *mod)
}
}

int trace_module_notify(struct notifier_block *self,
unsigned long val, void *data)
static int trace_module_notify(struct notifier_block *self,
unsigned long val, void *data)
{
struct module *mod = data;

Expand All @@ -858,6 +859,13 @@ int trace_module_notify(struct notifier_block *self,

return 0;
}
#else
static int trace_module_notify(struct notifier_block *self,
unsigned long val, void *data)
{
return 0;
}
#endif /* CONFIG_MODULES */

struct notifier_block trace_module_nb = {
.notifier_call = trace_module_notify,
Expand Down

0 comments on commit 61f919a

Please sign in to comment.