* [PATCH 1/3] iio:consumer.h: Fix include guard
@ 2012-08-17 15:57 Lars-Peter Clausen
2012-08-17 15:57 ` [PATCH 2/3] iio: Add missing include guards to headers Lars-Peter Clausen
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2012-08-17 15:57 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
The symbol name for the #ifndef and the #define of the include guard do not
match and thus it becomes quite ineffective. Add the missing '_' to fix this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
include/linux/iio/consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index e2657e6..06ab4ec 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -8,7 +8,7 @@
* the Free Software Foundation.
*/
#ifndef _IIO_INKERN_CONSUMER_H_
-#define _IIO_INKERN_CONSUMER_H
+#define _IIO_INKERN_CONSUMER_H_
#include <linux/iio/types.h>
struct iio_dev;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] iio: Add missing include guards to headers
2012-08-17 15:57 [PATCH 1/3] iio:consumer.h: Fix include guard Lars-Peter Clausen
@ 2012-08-17 15:57 ` Lars-Peter Clausen
2012-08-27 17:47 ` Jonathan Cameron
2012-08-17 15:57 ` [PATCH 3/3] iio:trigger_consumer.h: Add missing includes and forward declarations Lars-Peter Clausen
2012-08-27 17:47 ` [PATCH 1/3] iio:consumer.h: Fix include guard Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2012-08-17 15:57 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
Add include guards to the IIO headers where they are missing. This avoids
compile errors due to redefined types if a file is included more than once.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
strictly speaking kfifo_buf.h does not need one, since it only declares
functions, but I'd consider it to be good style to have them anyway.
---
include/linux/iio/kfifo_buf.h | 3 +++
include/linux/iio/machine.h | 5 +++++
include/linux/iio/trigger_consumer.h | 5 +++++
3 files changed, 13 insertions(+)
diff --git a/include/linux/iio/kfifo_buf.h b/include/linux/iio/kfifo_buf.h
index 014d5a1..25eeac7 100644
--- a/include/linux/iio/kfifo_buf.h
+++ b/include/linux/iio/kfifo_buf.h
@@ -1,3 +1,5 @@
+#ifndef __LINUX_IIO_KFIFO_BUF_H__
+#define __LINUX_IIO_KFIFO_BUF_H__
#include <linux/kfifo.h>
#include <linux/iio/iio.h>
@@ -6,3 +8,4 @@
struct iio_buffer *iio_kfifo_allocate(struct iio_dev *indio_dev);
void iio_kfifo_free(struct iio_buffer *r);
+#endif
diff --git a/include/linux/iio/machine.h b/include/linux/iio/machine.h
index 400a453..809a3f0 100644
--- a/include/linux/iio/machine.h
+++ b/include/linux/iio/machine.h
@@ -8,6 +8,9 @@
* the Free Software Foundation.
*/
+#ifndef __LINUX_IIO_MACHINE_H__
+#define __LINUX_IIO_MACHINE_H__
+
/**
* struct iio_map - description of link between consumer and device channels
* @adc_channel_label: Label used to identify the channel on the provider.
@@ -22,3 +25,5 @@ struct iio_map {
const char *consumer_dev_name;
const char *consumer_channel;
};
+
+#endif
diff --git a/include/linux/iio/trigger_consumer.h b/include/linux/iio/trigger_consumer.h
index 60d64b3..762a3d3 100644
--- a/include/linux/iio/trigger_consumer.h
+++ b/include/linux/iio/trigger_consumer.h
@@ -7,6 +7,9 @@
* the Free Software Foundation.
*/
+#ifndef __LINUX_IIO_TRIGGER_CONSUMER_H__
+#define __LINUX_IIO_TRIGGER_CONSUMER_H__
+
/**
* struct iio_poll_func - poll function pair
*
@@ -50,3 +53,5 @@ void iio_trigger_notify_done(struct iio_trigger *trig);
*/
int iio_triggered_buffer_postenable(struct iio_dev *indio_dev);
int iio_triggered_buffer_predisable(struct iio_dev *indio_dev);
+
+#endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/3] iio: Add missing include guards to headers
2012-08-17 15:57 ` [PATCH 2/3] iio: Add missing include guards to headers Lars-Peter Clausen
@ 2012-08-27 17:47 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2012-08-27 17:47 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Jonathan Cameron, linux-iio
On 08/17/2012 04:57 PM, Lars-Peter Clausen wrote:
> Add include guards to the IIO headers where they are missing. This avoids
> compile errors due to redefined types if a file is included more than once.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
merge to togreg
>
> ---
> strictly speaking kfifo_buf.h does not need one, since it only declares
> functions, but I'd consider it to be good style to have them anyway.
> ---
> include/linux/iio/kfifo_buf.h | 3 +++
> include/linux/iio/machine.h | 5 +++++
> include/linux/iio/trigger_consumer.h | 5 +++++
> 3 files changed, 13 insertions(+)
>
> diff --git a/include/linux/iio/kfifo_buf.h b/include/linux/iio/kfifo_buf.h
> index 014d5a1..25eeac7 100644
> --- a/include/linux/iio/kfifo_buf.h
> +++ b/include/linux/iio/kfifo_buf.h
> @@ -1,3 +1,5 @@
> +#ifndef __LINUX_IIO_KFIFO_BUF_H__
> +#define __LINUX_IIO_KFIFO_BUF_H__
>
> #include <linux/kfifo.h>
> #include <linux/iio/iio.h>
> @@ -6,3 +8,4 @@
> struct iio_buffer *iio_kfifo_allocate(struct iio_dev *indio_dev);
> void iio_kfifo_free(struct iio_buffer *r);
>
> +#endif
> diff --git a/include/linux/iio/machine.h b/include/linux/iio/machine.h
> index 400a453..809a3f0 100644
> --- a/include/linux/iio/machine.h
> +++ b/include/linux/iio/machine.h
> @@ -8,6 +8,9 @@
> * the Free Software Foundation.
> */
>
> +#ifndef __LINUX_IIO_MACHINE_H__
> +#define __LINUX_IIO_MACHINE_H__
> +
> /**
> * struct iio_map - description of link between consumer and device channels
> * @adc_channel_label: Label used to identify the channel on the provider.
> @@ -22,3 +25,5 @@ struct iio_map {
> const char *consumer_dev_name;
> const char *consumer_channel;
> };
> +
> +#endif
> diff --git a/include/linux/iio/trigger_consumer.h b/include/linux/iio/trigger_consumer.h
> index 60d64b3..762a3d3 100644
> --- a/include/linux/iio/trigger_consumer.h
> +++ b/include/linux/iio/trigger_consumer.h
> @@ -7,6 +7,9 @@
> * the Free Software Foundation.
> */
>
> +#ifndef __LINUX_IIO_TRIGGER_CONSUMER_H__
> +#define __LINUX_IIO_TRIGGER_CONSUMER_H__
> +
> /**
> * struct iio_poll_func - poll function pair
> *
> @@ -50,3 +53,5 @@ void iio_trigger_notify_done(struct iio_trigger *trig);
> */
> int iio_triggered_buffer_postenable(struct iio_dev *indio_dev);
> int iio_triggered_buffer_predisable(struct iio_dev *indio_dev);
> +
> +#endif
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] iio:trigger_consumer.h: Add missing includes and forward declarations
2012-08-17 15:57 [PATCH 1/3] iio:consumer.h: Fix include guard Lars-Peter Clausen
2012-08-17 15:57 ` [PATCH 2/3] iio: Add missing include guards to headers Lars-Peter Clausen
@ 2012-08-17 15:57 ` Lars-Peter Clausen
2012-08-27 17:47 ` Jonathan Cameron
2012-08-27 17:47 ` [PATCH 1/3] iio:consumer.h: Fix include guard Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2012-08-17 15:57 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
Add includes and forward declarations for types used in this file. This avoids
compile errors if the other files have not been included before.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
include/linux/iio/trigger_consumer.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/iio/trigger_consumer.h b/include/linux/iio/trigger_consumer.h
index 762a3d3..c4f8c74 100644
--- a/include/linux/iio/trigger_consumer.h
+++ b/include/linux/iio/trigger_consumer.h
@@ -10,6 +10,12 @@
#ifndef __LINUX_IIO_TRIGGER_CONSUMER_H__
#define __LINUX_IIO_TRIGGER_CONSUMER_H__
+#include <linux/interrupt.h>
+#include <linux/types.h>
+
+struct iio_dev;
+struct iio_trigger;
+
/**
* struct iio_poll_func - poll function pair
*
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] iio:trigger_consumer.h: Add missing includes and forward declarations
2012-08-17 15:57 ` [PATCH 3/3] iio:trigger_consumer.h: Add missing includes and forward declarations Lars-Peter Clausen
@ 2012-08-27 17:47 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2012-08-27 17:47 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Jonathan Cameron, linux-iio
On 08/17/2012 04:57 PM, Lars-Peter Clausen wrote:
> Add includes and forward declarations for types used in this file. This avoids
> compile errors if the other files have not been included before.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
merged to togreg
> ---
> include/linux/iio/trigger_consumer.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/iio/trigger_consumer.h b/include/linux/iio/trigger_consumer.h
> index 762a3d3..c4f8c74 100644
> --- a/include/linux/iio/trigger_consumer.h
> +++ b/include/linux/iio/trigger_consumer.h
> @@ -10,6 +10,12 @@
> #ifndef __LINUX_IIO_TRIGGER_CONSUMER_H__
> #define __LINUX_IIO_TRIGGER_CONSUMER_H__
>
> +#include <linux/interrupt.h>
> +#include <linux/types.h>
> +
> +struct iio_dev;
> +struct iio_trigger;
> +
> /**
> * struct iio_poll_func - poll function pair
> *
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] iio:consumer.h: Fix include guard
2012-08-17 15:57 [PATCH 1/3] iio:consumer.h: Fix include guard Lars-Peter Clausen
2012-08-17 15:57 ` [PATCH 2/3] iio: Add missing include guards to headers Lars-Peter Clausen
2012-08-17 15:57 ` [PATCH 3/3] iio:trigger_consumer.h: Add missing includes and forward declarations Lars-Peter Clausen
@ 2012-08-27 17:47 ` Jonathan Cameron
2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2012-08-27 17:47 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Jonathan Cameron, linux-iio
On 08/17/2012 04:57 PM, Lars-Peter Clausen wrote:
> The symbol name for the #ifndef and the #define of the include guard do not
> match and thus it becomes quite ineffective. Add the missing '_' to fix this.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
merged
> ---
> include/linux/iio/consumer.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
> index e2657e6..06ab4ec 100644
> --- a/include/linux/iio/consumer.h
> +++ b/include/linux/iio/consumer.h
> @@ -8,7 +8,7 @@
> * the Free Software Foundation.
> */
> #ifndef _IIO_INKERN_CONSUMER_H_
> -#define _IIO_INKERN_CONSUMER_H
> +#define _IIO_INKERN_CONSUMER_H_
> #include <linux/iio/types.h>
>
> struct iio_dev;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-27 17:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17 15:57 [PATCH 1/3] iio:consumer.h: Fix include guard Lars-Peter Clausen
2012-08-17 15:57 ` [PATCH 2/3] iio: Add missing include guards to headers Lars-Peter Clausen
2012-08-27 17:47 ` Jonathan Cameron
2012-08-17 15:57 ` [PATCH 3/3] iio:trigger_consumer.h: Add missing includes and forward declarations Lars-Peter Clausen
2012-08-27 17:47 ` Jonathan Cameron
2012-08-27 17:47 ` [PATCH 1/3] iio:consumer.h: Fix include guard Jonathan Cameron
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.