/* Returns an event of type @type otherwise NULL Called with trace_event_read_lock() held.  */
struct trace_event* ftrace_find_event(int type)
/* Returns an event of type @type otherwise NULL Called with trace_event_read_lock() held.  */
struct trace_event* ftrace_find_event(int type)
{
	struct trace_event *event;
	struct hlist_node *n;
	unsigned key;
	key = type & (EVENT_HASHSIZE - 1);
	hlist_for_each_entry(event, n, &event_hash[key], node) {
		if (event->type == type)
			return event;
	}
	return NULL;
}