staging:iio: Add ability to have event attributes with awkward names
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
388be48839
commit
7e29a0df16
@@ -284,6 +284,14 @@ struct iio_const_attr {
|
|||||||
.mask = _mask, \
|
.mask = _mask, \
|
||||||
.listel = &_ev_list };
|
.listel = &_ev_list };
|
||||||
|
|
||||||
|
#define IIO_EVENT_ATTR_NAMED_SH(_vname, _name, _ev_list, _show, _store, _mask) \
|
||||||
|
static struct iio_event_attr \
|
||||||
|
iio_event_attr_##_vname \
|
||||||
|
= { .dev_attr = __ATTR(_name, S_IRUGO | S_IWUSR, \
|
||||||
|
_show, _store), \
|
||||||
|
.mask = _mask, \
|
||||||
|
.listel = &_ev_list };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IIO_EVENT_ATTR - non-shared event attribute
|
* IIO_EVENT_ATTR - non-shared event attribute
|
||||||
* @_name: event name
|
* @_name: event name
|
||||||
|
Reference in New Issue
Block a user