include/linux/zio-buffer.h: fix missing return when buffer disabled

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
core.c: set memory to zero during allocation with kmem_cache_zalloc()

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
trigger: data_done returns an integer

The data_done trigger operation returns an integer which mean if the
trigger must be automatically re-armed (1) or not (0). The rearm value
it is returned by zio_trigger_data_done to notify if the trigger was
rearmed or not.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
include/linux/zio-sysfs.h: introduce helper to retrieve std attributes

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
promote __try_push() to generic trigger helper

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubinig@gnudd.com>
trigger: new trigger operation arm to handle trigger arming

This patch add a new trigger operation: arm().
The operation is useful because it allows a trigger to define its own
procedure to arm itself.

At the moment, nobody use the trigger operations data_done() and abort()
for custom tasks because the generic one works in most of the case.
Tipically there is nothing special to do if the arming procedure is
always the same.
This patch make sense of these operations because if you need a custom
arm(), probably, you also need a custom data_done() and abort().

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>