Lines Matching refs:trig_info
68 int iio_trigger_register(struct iio_trigger *trig_info) in iio_trigger_register() argument
72 trig_info->id = ida_simple_get(&iio_trigger_ida, 0, 0, GFP_KERNEL); in iio_trigger_register()
73 if (trig_info->id < 0) { in iio_trigger_register()
74 ret = trig_info->id; in iio_trigger_register()
78 dev_set_name(&trig_info->dev, "trigger%ld", in iio_trigger_register()
79 (unsigned long) trig_info->id); in iio_trigger_register()
81 ret = device_add(&trig_info->dev); in iio_trigger_register()
87 list_add_tail(&trig_info->list, &iio_trigger_list); in iio_trigger_register()
93 ida_simple_remove(&iio_trigger_ida, trig_info->id); in iio_trigger_register()
99 void iio_trigger_unregister(struct iio_trigger *trig_info) in iio_trigger_unregister() argument
102 list_del(&trig_info->list); in iio_trigger_unregister()
105 ida_simple_remove(&iio_trigger_ida, trig_info->id); in iio_trigger_unregister()
107 device_unregister(&trig_info->dev); in iio_trigger_unregister()