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

Introduce ZIO_PARAM_{TRIGGER,BUFFER} and use it


This introduces ZIO_PARAM_TRIGGER(_name)  and ZIO_PARAM_BUFFER(_name)
and uses them in zio-zero.  We'd love most software-driven devices
to use the buffer= and trigger= parameters to override the default, thus
the centralized macros.

Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
parent 9619ffbb
Branches
Tags
No related merge requests found
......@@ -14,10 +14,8 @@
#include <linux/zio.h>
#include <linux/zio-buffer.h>
static char *zzero_trigger;
static char *zzero_buffer;
module_param_named(trigger, zzero_trigger, charp, 0444);
module_param_named(buffer, zzero_buffer, charp, 0444);
ZIO_PARAM_TRIGGER(zzero_trigger);
ZIO_PARAM_BUFFER(zzero_buffer);
static int zzero_input(struct zio_cset *cset)
{
......
......@@ -189,6 +189,14 @@ static inline struct zio_channel *__first_enabled_chan(struct zio_cset *cset,
(cptr = __first_enabled_chan(cset, cptr)); \
cptr++)
/* We suggest all drivers have these options */
#define ZIO_PARAM_TRIGGER(_name) \
char *_name; \
module_param_named(trigger, _name, charp, 0444)
#define ZIO_PARAM_BUFFER(_name) \
char *_name; \
module_param_named(buffer, _name, charp, 0444)
#ifdef __ZIO_INTERNAL__
/* This list is used in the core to keep track of registered objects */
......
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