/* Returns 0 on success or -ENOENT if no matching textsearch registration was found.  */
int textsearch_unregister(struct ts_ops *ops)
/* Returns 0 on success or -ENOENT if no matching textsearch registration was found.  */
int textsearch_unregister(struct ts_ops *ops)
{
	int err = 0;
	struct ts_ops *o;
	spin_lock(&ts_mod_lock);
	list_for_each_entry(o, &ts_ops, list) {
		if (o == ops) {
			list_del_rcu(&o->list);
			goto out;
		}
	}
	err = -ENOENT;
out:
	spin_unlock(&ts_mod_lock);
	return err;
}