Lines Matching defs:t
32 struct iio_sw_trigger_type *t = NULL, *iter;
36 t = iter;
40 return t;
43 int iio_register_sw_trigger_type(struct iio_sw_trigger_type *t)
49 iter = __iio_find_sw_trigger_type(t->name, strlen(t->name));
53 list_add_tail(&t->list, &iio_trigger_types_list);
59 t->group = configfs_register_default_group(iio_triggers_group, t->name,
61 if (IS_ERR(t->group)) {
63 list_del(&t->list);
65 ret = PTR_ERR(t->group);
72 void iio_unregister_sw_trigger_type(struct iio_sw_trigger_type *t)
77 iter = __iio_find_sw_trigger_type(t->name, strlen(t->name));
79 list_del(&t->list);
82 configfs_unregister_default_group(t->group);
89 struct iio_sw_trigger_type *t;
92 t = __iio_find_sw_trigger_type(name, strlen(name));
93 if (t && !try_module_get(t->owner))
94 t = NULL;
97 return t;
102 struct iio_sw_trigger *t;
110 t = tt->ops->probe(name);
111 if (IS_ERR(t))
114 t->trigger_type = tt;
116 return t;
119 return t;
123 void iio_sw_trigger_destroy(struct iio_sw_trigger *t)
125 struct iio_sw_trigger_type *tt = t->trigger_type;
127 tt->ops->remove(t);
135 struct iio_sw_trigger *t;
137 t = iio_sw_trigger_create(group->cg_item.ci_name, name);
138 if (IS_ERR(t))
139 return ERR_CAST(t);
141 config_item_set_name(&t->group.cg_item, "%s", name);
143 return &t->group;
149 struct iio_sw_trigger *t = to_iio_sw_trigger(item);
151 iio_sw_trigger_destroy(t);