From: Jonathan Cameron Date: Sat, 26 Jun 2010 11:54:22 +0000 (+0100) Subject: staging:iio: Add ability to have event attributes with awkward names X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7e29a0df16ddfcb971a1d498752a782a68e45281;p=openwrt%2Fstaging%2Fblogic.git staging:iio: Add ability to have event attributes with awkward names Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/sysfs.h b/drivers/staging/iio/sysfs.h index 79926efec6d4..60834162eb32 100644 --- a/drivers/staging/iio/sysfs.h +++ b/drivers/staging/iio/sysfs.h @@ -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