Title: [9375] trunk/drivers/staging/iio/sysfs.h: merge from upstream: staging: iio: events move buffer codes so they do not clash with new scheme
Revision
9375
Author
vapier
Date
2010-10-24 16:53:38 -0400 (Sun, 24 Oct 2010)

Log Message

merge from upstream: staging: iio: events move buffer codes so they do not clash with new scheme

From: Jonathan Cameron <[email protected]>

We could blugeon these more into the scheme I guess, but does it make sense
to do so?

Also remove all remain vestiges of old scheme.

Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Modified Paths

Diff

Modified: trunk/drivers/staging/iio/sysfs.h (9374 => 9375)


--- trunk/drivers/staging/iio/sysfs.h	2010-10-24 20:53:34 UTC (rev 9374)
+++ trunk/drivers/staging/iio/sysfs.h	2010-10-24 20:53:38 UTC (rev 9375)
@@ -295,13 +295,9 @@
 #define IIO_UNMOD_EVENT_CODE(channelclass, number, type, direction)	\
 	IIO_EVENT_CODE(channelclass, 0, number, 0, type, direction)
 
-#define IIO_EVENT_CODE_DATA_RDY		100
-#define IIO_EVENT_CODE_RING_BASE	200
-#define IIO_EVENT_CODE_ACCEL_BASE	300
-#define IIO_EVENT_CODE_GYRO_BASE	400
-#define IIO_EVENT_CODE_MISC_BASE	600
 
-#define IIO_EVENT_CODE_DEVICE_SPECIFIC	1000
+#define IIO_BUFFER_EVENT_CODE(code)		\
+	(IIO_EV_CLASS_BUFFER | (code << 8))
 
 /**
  * IIO_EVENT_ATTR_RING_50_FULL - ring buffer event to indicate 50% full
@@ -333,8 +329,8 @@
 #define IIO_EVENT_ATTR_RING_75_FULL_SH(_evlist, _show, _store, _mask)	\
 	IIO_EVENT_ATTR_SH(ring_75_full, _evlist, _show, _store, _mask)
 
-#define IIO_EVENT_CODE_RING_50_FULL	IIO_EVENT_CODE_RING_BASE
-#define IIO_EVENT_CODE_RING_75_FULL	(IIO_EVENT_CODE_RING_BASE + 1)
-#define IIO_EVENT_CODE_RING_100_FULL	(IIO_EVENT_CODE_RING_BASE + 2)
+#define IIO_EVENT_CODE_RING_50_FULL	IIO_BUFFER_EVENT_CODE(0)
+#define IIO_EVENT_CODE_RING_75_FULL	IIO_BUFFER_EVENT_CODE(1)
+#define IIO_EVENT_CODE_RING_100_FULL	IIO_BUFFER_EVENT_CODE(2)
 
 #endif /* _INDUSTRIAL_IO_SYSFS_H_ */
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to