提交 91ffbabf 编写于 作者: D Denis CIOCCA 提交者: Jonathan Cameron

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: NDenis Ciocca <denis.ciocca@st.com>
Reported-by: NRandy Dunlap  <rdunlap@infradead.org>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 5aa57f0a
...@@ -235,6 +235,16 @@ void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); ...@@ -235,6 +235,16 @@ void st_sensors_deallocate_trigger(struct iio_dev *indio_dev);
irqreturn_t st_sensors_trigger_handler(int irq, void *p); irqreturn_t st_sensors_trigger_handler(int irq, void *p);
int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf); 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 #endif
int st_sensors_init_sensor(struct iio_dev *indio_dev); int st_sensors_init_sensor(struct iio_dev *indio_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册