/* Sets the probe callback corresponding to one tracepoint.  */
static void set_tracepoint(struct tracepoint_entry **entry, struct tracepoint *elem, int active)
/* Sets the probe callback corresponding to one tracepoint.  */
static void set_tracepoint(struct tracepoint_entry **entry, struct tracepoint *elem, int active)
{
	WARN_ON(strcmp((*entry)->name, elem->name) != 0);
	if (elem->regfunc && !elem->state && active)
		elem->regfunc();
	else if (elem->unregfunc && elem->state && !active)
		elem->unregfunc();
	rcu_assign_pointer(elem->funcs, (*entry)->funcs);
	elem->state = active;
}