Skip to content

Commit

Permalink
iio:common: added allocate and deallocate trigger functions when trig…
Browse files Browse the repository at this point in the history
…ger 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>
  • Loading branch information
Denis CIOCCA authored and Jonathan Cameron committed Feb 9, 2013
1 parent 5aa57f0 commit 91ffbab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/linux/iio/common/st_sensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 91ffbab

Please sign in to comment.