diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 9bb96e5a2848..c4efe9b8280d 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -16,7 +16,7 @@ enum { }; #endif -TRACE_EVENT(power_start, +DECLARE_EVENT_CLASS(power, TP_PROTO(unsigned int type, unsigned int state), @@ -35,6 +35,20 @@ TRACE_EVENT(power_start, TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) ); +DEFINE_EVENT(power, power_start, + + TP_PROTO(unsigned int type, unsigned int state), + + TP_ARGS(type, state) +); + +DEFINE_EVENT(power, power_frequency, + + TP_PROTO(unsigned int type, unsigned int state), + + TP_ARGS(type, state) +); + TRACE_EVENT(power_end, TP_PROTO(int dummy), @@ -53,26 +67,6 @@ TRACE_EVENT(power_end, ); - -TRACE_EVENT(power_frequency, - - TP_PROTO(unsigned int type, unsigned int state), - - TP_ARGS(type, state), - - TP_STRUCT__entry( - __field( u64, type ) - __field( u64, state ) - ), - - TP_fast_assign( - __entry->type = type; - __entry->state = state; - ), - - TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long) __entry->state) -); - #endif /* _TRACE_POWER_H */ /* This part must be outside protection */