98 #include <linux/module.h>
99 #include <linux/types.h>
100 #include <linux/string.h>
106 #include <linux/slab.h>
111 static inline struct ts_ops *lookup_ts_algo(
const char *
name)
118 if (!try_module_get(o->
owner))
150 spin_lock(&ts_mod_lock);
159 spin_unlock(&ts_mod_lock);
180 spin_lock(&ts_mod_lock);
183 list_del_rcu(&o->
list);
190 spin_unlock(&ts_mod_lock);
200 static unsigned int get_linear_data(
unsigned int consumed,
const u8 **
dst,
207 *dst = st->
data + consumed;
208 return st->
len - consumed;
229 const void *
data,
unsigned int len)
237 return textsearch_find(conf, state);
270 ops = lookup_ts_algo(algo);
271 #ifdef CONFIG_MODULES
278 request_module(
"ts_%s", algo);
279 ops = lookup_ts_algo(algo);
286 conf = ops->
init(pattern, len, gfp_mask, flags);
297 module_put(ops->
owner);
312 if (conf->
ops->destroy)
313 conf->
ops->destroy(conf);
314 module_put(conf->
ops->owner);