staging:iio: Fix IIO_EVENT_ATTR initialization of list head
authorJonathan Cameron <jic23@cam.ac.uk>
Sat, 26 Jun 2010 11:54:20 +0000 (12:54 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Jul 2010 19:25:29 +0000 (12:25 -0700)
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/sysfs.h

index afcf5ab..79926ef 100644 (file)
@@ -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