]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
iio:common: added allocate and deallocate trigger functions when trigger is disabled.
authorDenis CIOCCA <denis.ciocca@st.com>
Thu, 7 Feb 2013 09:46:00 +0000 (09:46 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 9 Feb 2013 10:44:44 +0000 (10:44 +0000)
This patch resolve a bugfix when driver is compiled without trigger.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
include/linux/iio/common/st_sensors.h

index c40fdf537f694b1c4879cd272f6c20f53d7c087d..1f86a97ab2e2016407e68fe352bba3b4d018880d 100644 (file)
@@ -235,6 +235,16 @@ void st_sensors_deallocate_trigger(struct iio_dev *indio_dev);
 irqreturn_t st_sensors_trigger_handler(int irq, void *p);
 
 int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf);
+#else
+static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
+                               const struct iio_trigger_ops *trigger_ops)
+{
+       return 0;
+}
+static inline void st_sensors_deallocate_trigger(struct iio_dev *indio_dev)
+{
+       return;
+}
 #endif
 
 int st_sensors_init_sensor(struct iio_dev *indio_dev);