aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2013-02-09 05:49:00 -0500
committerJonathan Cameron <jic23@kernel.org>2013-02-09 10:22:14 -0500
commitaaa300262c5912bda34c9cf871719209eae01b06 (patch)
treeb8aacdd6cf7dfbc6caf125a368fb9b2f84e52241 /include/linux/iio
parentad6c46b0c712e0d8fd8a80ee372b30f14a781888 (diff)
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 <jic23@kernel.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Denis Ciocca <denis.ciocca@st.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/trigger.h5
1 files changed, 5 insertions, 0 deletions
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 @@
12#ifndef _IIO_TRIGGER_H_ 12#ifndef _IIO_TRIGGER_H_
13#define _IIO_TRIGGER_H_ 13#define _IIO_TRIGGER_H_
14 14
15#ifdef CONFIG_IIO_TRIGGER
15struct iio_subirq { 16struct iio_subirq {
16 bool enabled; 17 bool enabled;
17}; 18};
@@ -117,4 +118,8 @@ irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private);
117__printf(1, 2) struct iio_trigger *iio_trigger_alloc(const char *fmt, ...); 118__printf(1, 2) struct iio_trigger *iio_trigger_alloc(const char *fmt, ...);
118void iio_trigger_free(struct iio_trigger *trig); 119void iio_trigger_free(struct iio_trigger *trig);
119 120
121#else
122struct iio_trigger;
123struct iio_trigger_ops;
124#endif
120#endif /* _IIO_TRIGGER_H_ */ 125#endif /* _IIO_TRIGGER_H_ */