/* Add callback @new to be called when an event occurs in @rc.  */
int uwb_notifs_register(struct uwb_rc *rc, struct uwb_notifs_handler *new)
/* Add callback @new to be called when an event occurs in @rc.  */
int uwb_notifs_register(struct uwb_rc *rc, struct uwb_notifs_handler *new)
{
	if (mutex_lock_interruptible(&rc->notifs_chain.mutex))
		return -ERESTARTSYS;
	list_add(&new->list_node, &rc->notifs_chain.list);
	mutex_unlock(&rc->notifs_chain.mutex);
	return 0;
}