All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: rdunlap@infradead.org, denis.ciocca@st.com,
	Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH 1/2] iio:triggers Protect functions in triggers.h from use when not compiled
Date: Sat,  9 Feb 2013 10:49:26 +0000	[thread overview]
Message-ID: <1360406967-25026-2-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <1360406967-25026-1-git-send-email-jic23@kernel.org>

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>
---
 include/linux/iio/trigger.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index 20239da..c66e0a9 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_ */
-- 
1.8.1.1

  reply	other threads:[~2013-02-09 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-09 10:49 [PATCH 0/2] iio:st_sensors more fixes when !IIO_CONFIG_TRIGGER Jonathan Cameron
2013-02-09 10:49 ` Jonathan Cameron [this message]
2013-02-09 10:49 ` [PATCH 2/2] iio:st_sensors fix build when !CONFIG_IIO_TRIGGER Jonathan Cameron
2013-02-09 11:53   ` Denis Ciocca
2013-02-09 15:24     ` Jonathan Cameron
2013-02-09 15:25 ` [PATCH 0/2] iio:st_sensors more fixes when !IIO_CONFIG_TRIGGER Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360406967-25026-2-git-send-email-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=denis.ciocca@st.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.