-
Alessandro Rubini authored
If the trigger is enabled on creation, it may fire before the cset is ready. This happened to me with "modprobe zio-zero trigger=irq". For this reason it must start disabled. Also, the create method MUST set ti->cset before activating the trigger, because the cset lock is needed to access the enable/disable flag. The commit adds a WARN() if the field is not set after creation, then it leaves it zeroed to ensure the system will crash, instead of having a subtle race. Also, add a pair of FIXME notes about the need to allow changing a trigger type while leaving the new one disabled. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
740978cf