Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61f919a1 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 6d723736
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -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;
@@ -840,7 +841,7 @@ static void trace_module_remove_events(struct module *mod)
	}
}

int trace_module_notify(struct notifier_block *self,
static int trace_module_notify(struct notifier_block *self,
			       unsigned long val, void *data)
{
	struct module *mod = data;
@@ -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,