mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-19 12:49:10 +08:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
5aa57f0a65
commit
91ffbabfd9
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user