When I decided to compile a driver with a trigger as a module, I realized that I needed to add a trigger ops structure with the .owner field set to THIS_MODULE. The reason is iio_trigger_put() calls module_put(trig->ops->owner), which is a noop if the driver is compiled within the kernel. Otherwise, trigger->ops is considered optional. We could add a test there to not call module_put() if ops is NULL, but we wouldn't have the module refcount protection anymore; the trigger could be removed while still in use given iio_trigger_unregister() does not check if the trigger is still in use. To address that issue, should we make trigger->ops mandatory - its function members could still be optional? If we go this way, shall we go even further and fold the ops structure within iio_trigger? Gwendal. -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html