Lines Matching refs:t
129 struct iio_sysfs_trig *t; in iio_sysfs_trigger_probe() local
134 list_for_each_entry(t, &iio_sysfs_trig_list, l) in iio_sysfs_trigger_probe()
135 if (id == t->id) { in iio_sysfs_trigger_probe()
143 t = kmalloc(sizeof(*t), GFP_KERNEL); in iio_sysfs_trigger_probe()
144 if (t == NULL) { in iio_sysfs_trigger_probe()
148 t->id = id; in iio_sysfs_trigger_probe()
149 t->trig = iio_trigger_alloc(&iio_sysfs_trig_dev, "sysfstrig%d", id); in iio_sysfs_trigger_probe()
150 if (!t->trig) { in iio_sysfs_trigger_probe()
155 t->trig->dev.groups = iio_sysfs_trigger_attr_groups; in iio_sysfs_trigger_probe()
156 iio_trigger_set_drvdata(t->trig, t); in iio_sysfs_trigger_probe()
158 t->work = IRQ_WORK_INIT_HARD(iio_sysfs_trigger_work); in iio_sysfs_trigger_probe()
160 ret = iio_trigger_register(t->trig); in iio_sysfs_trigger_probe()
163 list_add(&t->l, &iio_sysfs_trig_list); in iio_sysfs_trigger_probe()
169 iio_trigger_free(t->trig); in iio_sysfs_trigger_probe()
171 kfree(t); in iio_sysfs_trigger_probe()
179 struct iio_sysfs_trig *t = NULL, *iter; in iio_sysfs_trigger_remove() local
184 t = iter; in iio_sysfs_trigger_remove()
187 if (!t) { in iio_sysfs_trigger_remove()
192 iio_trigger_unregister(t->trig); in iio_sysfs_trigger_remove()
193 irq_work_sync(&t->work); in iio_sysfs_trigger_remove()
194 iio_trigger_free(t->trig); in iio_sysfs_trigger_remove()
196 list_del(&t->l); in iio_sysfs_trigger_remove()
197 kfree(t); in iio_sysfs_trigger_remove()