aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2008-11-14 17:47:44 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-16 03:01:33 -0500
commitc420970ef476d7d68df119711700666224001f43 (patch)
treec10ebb11a03199f99d779472037bd49129b43abb
parentda7b3eab167091693ad215ad7692f7d0d24d1356 (diff)
tracepoints: use unregister return value
Impact: bugfix. Unregistering a tracepoint can fail. Return the error value. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/linux/tracepoint.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 69648c54a326..c60a791f8874 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -73,9 +73,9 @@ struct tracepoint {
73 return tracepoint_probe_register(#name ":" #proto, \ 73 return tracepoint_probe_register(#name ":" #proto, \
74 (void *)probe); \ 74 (void *)probe); \
75 } \ 75 } \
76 static inline void unregister_trace_##name(void (*probe)(proto))\ 76 static inline int unregister_trace_##name(void (*probe)(proto)) \
77 { \ 77 { \
78 tracepoint_probe_unregister(#name ":" #proto, \ 78 return tracepoint_probe_unregister(#name ":" #proto, \
79 (void *)probe); \ 79 (void *)probe); \
80 } 80 }
81 81
@@ -92,8 +92,10 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin,
92 { \ 92 { \
93 return -ENOSYS; \ 93 return -ENOSYS; \
94 } \ 94 } \
95 static inline void unregister_trace_##name(void (*probe)(proto))\ 95 static inline int unregister_trace_##name(void (*probe)(proto)) \
96 { } 96 { \
97 return -ENOSYS; \
98 }
97 99
98static inline void tracepoint_update_probe_range(struct tracepoint *begin, 100static inline void tracepoint_update_probe_range(struct tracepoint *begin,
99 struct tracepoint *end) 101 struct tracepoint *end)