staging:iio:adc:ad7816 and adt75 change to meaningful event code.
authorJonathan Cameron <jic23@cam.ac.uk>
Wed, 18 May 2011 13:42:14 +0000 (14:42 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 19 May 2011 23:15:00 +0000 (16:15 -0700)
This was another abuse of the buffer event codes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/adc/ad7816.c
drivers/staging/iio/adc/adt75.c

index bee4209e8814a54b4c02060e163f828b67aabab1..873fe2bf83123a8c4aa06de6dc7fc729c5b5c36e 100644 (file)
@@ -247,7 +247,10 @@ static const struct attribute_group ad7816_attribute_group = {
  * temperature bound events
  */
 
-#define IIO_EVENT_CODE_AD7816_OTI    IIO_BUFFER_EVENT_CODE(0)
+#define IIO_EVENT_CODE_AD7816_OTI IIO_UNMOD_EVENT_CODE(IIO_EV_CLASS_TEMP, \
+                                                      0,               \
+                                                      IIO_EV_TYPE_THRESH, \
+                                                      IIO_EV_DIR_FALLING)
 
 static irqreturn_t ad7816_event_handler(int irq, void *private)
 {
index 4b1c0fa73a82192b8e80d0bea03174604bf7c46d..2a44428a107503e8670b771198b10d832fdbd500 100644 (file)
@@ -258,7 +258,10 @@ static const struct attribute_group adt75_attribute_group = {
  * temperature bound events
  */
 
-#define IIO_EVENT_CODE_ADT75_OTI    IIO_BUFFER_EVENT_CODE(0)
+#define IIO_EVENT_CODE_ADT75_OTI IIO_UNMOD_EVENT_CODE(IIO_EV_CLASS_TEMP, \
+                                                     0,                \
+                                                     IIO_EV_TYPE_THRESH, \
+                                                     IIO_EV_DIR_FALLING)
 
 static irqreturn_t adt75_event_handler(int irq, void *private)
 {