Skip to content

Commit 91ffbab

Browse files
ciocca-djic23
authored andcommitted
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>
1 parent 5aa57f0 commit 91ffbab

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎include/linux/iio/common/st_sensors.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ void st_sensors_deallocate_trigger(struct iio_dev *indio_dev);
235235
irqreturn_t st_sensors_trigger_handler(int irq, void *p);
236236

237237
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+
}
238248
#endif
239249

240250
int st_sensors_init_sensor(struct iio_dev *indio_dev);

0 commit comments

Comments
 (0)