staging:iio: Fix IIO_EVENT_ATTR initialization of list head

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Jonathan Cameron
2010-06-26 12:54:20 +01:00
committed by Greg Kroah-Hartman
parent 751a37007f
commit 3bbb49aa3f

View File

@@ -293,10 +293,7 @@ struct iio_const_attr {
* @_handler: handler function to be called * @_handler: handler function to be called
**/ **/
#define IIO_EVENT_ATTR(_name, _show, _store, _mask, _handler) \ #define IIO_EVENT_ATTR(_name, _show, _store, _mask, _handler) \
static struct iio_event_handler_list \ IIO_EVENT_SH(_name, _handler); \
iio_event_##_name = { \
.handler = _handler, \
}; \
static struct \ static struct \
iio_event_attr \ iio_event_attr \
iio_event_attr_##_name \ iio_event_attr_##_name \
@@ -324,6 +321,7 @@ struct iio_const_attr {
#define IIO_EVENT_CODE_GYRO_BASE 400 #define IIO_EVENT_CODE_GYRO_BASE 400
#define IIO_EVENT_CODE_ADC_BASE 500 #define IIO_EVENT_CODE_ADC_BASE 500
#define IIO_EVENT_CODE_MISC_BASE 600 #define IIO_EVENT_CODE_MISC_BASE 600
#define IIO_EVENT_CODE_LIGHT_BASE 700
#define IIO_EVENT_CODE_DEVICE_SPECIFIC 1000 #define IIO_EVENT_CODE_DEVICE_SPECIFIC 1000