aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/ring_generic.h
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2010-07-11 16:39:14 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 11:38:28 -0700
commit2662051e0868d1bde0abeea19bd54c3c18941afc (patch)
tree87a63f47af6c27463aa71c11c8be5e2f2cfdde7a /drivers/staging/iio/ring_generic.h
parentstaging: iio: imu: allow adis16300 and adis16400 to build without ring buffer support. (diff)
downloadlinux-dev-2662051e0868d1bde0abeea19bd54c3c18941afc.tar.xz
linux-dev-2662051e0868d1bde0abeea19bd54c3c18941afc.zip
staging: iio: Add stubs for iio_ring_buffer_[un]register and equivalent driver stubs
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/ring_generic.h')
-rw-r--r--drivers/staging/iio/ring_generic.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h
index 0e443757b029..dbf11e180629 100644
--- a/drivers/staging/iio/ring_generic.h
+++ b/drivers/staging/iio/ring_generic.h
@@ -11,6 +11,8 @@
#define _IIO_RING_GENERIC_H_
#include "iio.h"
+#ifdef CONFIG_IIO_RING_BUFFER
+
struct iio_handler;
struct iio_ring_buffer;
struct iio_dev;
@@ -287,5 +289,14 @@ ssize_t iio_show_ring_enable(struct device *dev,
#define IIO_RING_ENABLE_ATTR DEVICE_ATTR(ring_enable, S_IRUGO | S_IWUSR, \
iio_show_ring_enable, \
iio_store_ring_enable)
+#else /* CONFIG_IIO_RING_BUFFER */
+static inline int iio_ring_buffer_register(struct iio_ring_buffer *ring, int id)
+{
+ return 0;
+};
+static inline void iio_ring_buffer_unregister(struct iio_ring_buffer *ring)
+{};
+
+#endif /* CONFIG_IIO_RING_BUFFER */
#endif /* _IIO_RING_GENERIC_H_ */