.name = "sys_enter"#sname, \
.system = "syscalls", \
.event = &enter_syscall_print_##sname, \
- .raw_init = trace_event_raw_init, \
+ .raw_init = init_syscall_trace, \
.show_format = syscall_enter_format, \
.define_fields = syscall_enter_define_fields, \
.regfunc = reg_event_syscall_enter, \
.name = "sys_exit"#sname, \
.system = "syscalls", \
.event = &exit_syscall_print_##sname, \
- .raw_init = trace_event_raw_init, \
+ .raw_init = init_syscall_trace, \
.show_format = syscall_exit_format, \
.define_fields = syscall_exit_define_fields, \
.regfunc = reg_event_syscall_exit, \
if (set_syscall_print_fmt(call) < 0)
return -ENOMEM;
- id = register_ftrace_event(call->event);
- if (!id) {
+ id = trace_event_raw_init(call);
+
+ if (id < 0) {
free_syscall_print_fmt(call);
- return -ENODEV;
+ return id;
}
- call->id = id;
- INIT_LIST_HEAD(&call->fields);
- return 0;
+
+ return id;
}
int __init init_ftrace_syscalls(void)