diff options
author | Denis CIOCCA <denis.ciocca@st.com> | 2013-02-07 04:46:00 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-02-09 05:44:44 -0500 |
commit | 91ffbabfd9ae6b9bfef02bb1e0fbba451c7289a7 (patch) | |
tree | 1317b513b114e77ef48f2509b21917c183407f0f /include/linux/iio | |
parent | 5aa57f0a655276f62683c0cc714cd6328d98e08a (diff) |
iio:common: added allocate and deallocate trigger functions when trigger is disabled.
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>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/common/st_sensors.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index c40fdf537f69..1f86a97ab2e2 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
@@ -235,6 +235,16 @@ void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); | |||
235 | irqreturn_t st_sensors_trigger_handler(int irq, void *p); | 235 | irqreturn_t st_sensors_trigger_handler(int irq, void *p); |
236 | 236 | ||
237 | int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf); | 237 | int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf); |
238 | #else | ||
239 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | ||
240 | const struct iio_trigger_ops *trigger_ops) | ||
241 | { | ||
242 | return 0; | ||
243 | } | ||
244 | static inline void st_sensors_deallocate_trigger(struct iio_dev *indio_dev) | ||
245 | { | ||
246 | return; | ||
247 | } | ||
238 | #endif | 248 | #endif |
239 | 249 | ||
240 | int st_sensors_init_sensor(struct iio_dev *indio_dev); | 250 | int st_sensors_init_sensor(struct iio_dev *indio_dev); |