Skip to content
Snippets Groups Projects
Commit 90c6f046 authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

zio-trigger.h: offer zio_generic_data_done() as inline function


The function used to be called __zio_internal_data_done, in
heklpers.c.  Being used once only, it was expanded inline by the
compiler, so nothing changes for previous code.

However, if a trigger needs to implement its own data_done method, it
will most likely need to replicate this code, so it's better made
avaiable directly to everybody.  An alternative would be running this
code every time, before or after calling t_op->data_done, but we'd
better let each trigger choose the order of its own operations.

Actually, there is one difference: the input active block is set to NULL
after being stored to the current buffer, so the later implementation
of stop_io (used in zio-irq-tdc.c) won't expose a bug.

Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
parent a496ca04
Branches
No related merge requests found
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