Skip to content

Commit

Permalink
staging:iio: Add ability to have event attributes with awkward names
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Jul 8, 2010
1 parent 388be48 commit 7e29a0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/staging/iio/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ struct iio_const_attr {
.mask = _mask, \
.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
* @_name: event name
Expand Down

0 comments on commit 7e29a0d

Please sign in to comment.