From: Jonathan Cameron Date: Sat, 9 Feb 2013 10:49:00 +0000 (+0000) Subject: iio:triggers Protect functions in triggers.h from use when not compiled X-Git-Tag: Ubuntu-5.10.0-12.13~19709^2~53^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=aaa300262c5912bda34c9cf871719209eae01b06;p=mirror_ubuntu-hirsute-kernel.git iio:triggers Protect functions in triggers.h from use when not compiled Also include a couple of forward defs of struct iio_trigger and struct iio_trigger_ops to avoid doing this in each driver. Signed-off-by: Jonathan Cameron Reported-by: Randy Dunlap Acked-by: Denis Ciocca --- diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h index 20239da1d0f7..c66e0a96f6e8 100644 --- a/include/linux/iio/trigger.h +++ b/include/linux/iio/trigger.h @@ -12,6 +12,7 @@ #ifndef _IIO_TRIGGER_H_ #define _IIO_TRIGGER_H_ +#ifdef CONFIG_IIO_TRIGGER struct iio_subirq { bool enabled; }; @@ -117,4 +118,8 @@ irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private); __printf(1, 2) struct iio_trigger *iio_trigger_alloc(const char *fmt, ...); void iio_trigger_free(struct iio_trigger *trig); +#else +struct iio_trigger; +struct iio_trigger_ops; +#endif #endif /* _IIO_TRIGGER_H_ */