Commit b73e11de authored by Federico Vaga's avatar Federico Vaga

trig: print message on wrong usage of data_done

If the driver call data_done when the trigger was un-armed, then print a
debug message. This is useful on driver development.

Theoretically, this code should not be compiled if we are not setting -DDEBUG
Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 177bf9a8
......@@ -194,6 +194,8 @@ static int __zio_trigger_data_done(struct zio_cset *cset)
int must_rearm;
spin_lock_irqsave(&cset->lock, flags);
if (unlikely(!(cset->ti->flags & ZIO_TI_ARMED)))
dev_dbg(&cset->head.dev, "data-done: un-armed trigger\n");
if (cset->ti->t_op->data_done)
must_rearm = cset->ti->t_op->data_done(cset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment