From: Jonathan Cameron Date: Sat, 26 Jun 2010 11:54:20 +0000 (+0100) Subject: staging:iio: Fix IIO_EVENT_ATTR initialization of list head X-Git-Tag: firefly_0821_release~9833^2~1255^2~1^2~286 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3bbb49aa3f667e6b871886bd75b3bb311d656eea;p=firefly-linux-kernel-4.4.55.git staging:iio: Fix IIO_EVENT_ATTR initialization of list head 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 afcf5ab85f48..79926efec6d4 100644 --- a/drivers/staging/iio/sysfs.h +++ b/drivers/staging/iio/sysfs.h @@ -293,10 +293,7 @@ struct iio_const_attr { * @_handler: handler function to be called **/ #define IIO_EVENT_ATTR(_name, _show, _store, _mask, _handler) \ - static struct iio_event_handler_list \ - iio_event_##_name = { \ - .handler = _handler, \ - }; \ + IIO_EVENT_SH(_name, _handler); \ static struct \ iio_event_attr \ iio_event_attr_##_name \ @@ -324,6 +321,7 @@ struct iio_const_attr { #define IIO_EVENT_CODE_GYRO_BASE 400 #define IIO_EVENT_CODE_ADC_BASE 500 #define IIO_EVENT_CODE_MISC_BASE 600 +#define IIO_EVENT_CODE_LIGHT_BASE 700 #define IIO_EVENT_CODE_DEVICE_SPECIFIC 1000