Commit 0994f8c7 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Federico Vaga

trigger-user: arm on push only of all channels are ready

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 0ceb10aa
......@@ -41,10 +41,16 @@ static int ztu_push_block(struct zio_ti *ti, struct zio_channel *chan,
struct zio_block *block)
{
pr_debug("%s:%d\n", __func__, __LINE__);
struct zio_cset *cset = chan->cset;
if (chan->active_block)
return -EBUSY;
chan->active_block = block;
/* If all enabled channels are ready, tell hardware we are ready */
chan_for_each(chan, cset)
if (!chan->active_block)
return 0;
getnstimeofday(&ti->tstamp);
zio_arm_trigger(ti);
return 0;
......
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