From: Cristina Opriceana <cristina.opriceana@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] Staging: iio: Added define guards where needed
Date: Wed, 4 Mar 2015 02:37:15 +0200 [thread overview]
Message-ID: <20150304003715.GA15492@Inspiron> (raw)
The following files were added define guards to prevent multiple
inclusion.
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
---
drivers/staging/iio/Documentation/iio_utils.h | 4 ++++
drivers/staging/iio/accel/sca3000.h | 5 ++++-
drivers/staging/iio/frequency/dds.h | 4 ++++
drivers/staging/iio/meter/meter.h | 4 ++++
drivers/staging/iio/resolver/ad2s1210.h | 3 +++
5 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h
index 568eff0..bd6982c 100644
--- a/drivers/staging/iio/Documentation/iio_utils.h
+++ b/drivers/staging/iio/Documentation/iio_utils.h
@@ -6,6 +6,8 @@
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
+#ifndef _IIO_UTILS_H
+#define _IIO_UTILS_H
#include <string.h>
#include <stdlib.h>
@@ -681,3 +683,5 @@ error_free:
free(temp);
return ret;
}
+
+#endif /* _IIO_UTILS_H */
diff --git a/drivers/staging/iio/accel/sca3000.h b/drivers/staging/iio/accel/sca3000.h
index b284e5a..9c8a958 100644
--- a/drivers/staging/iio/accel/sca3000.h
+++ b/drivers/staging/iio/accel/sca3000.h
@@ -38,6 +38,9 @@
* Can probably alleviate this by reading the interrupt register on start, but
* that is really just brushing the problem under the carpet.
*/
+#ifndef _SCA3000
+#define _SCA3000
+
#define SCA3000_WRITE_REG(a) (((a) << 2) | 0x02)
#define SCA3000_READ_REG(a) ((a) << 2)
@@ -272,4 +275,4 @@ static inline void sca3000_ring_int_process(u8 val, void *ring)
}
#endif
-
+#endif /* _SCA3000 */
diff --git a/drivers/staging/iio/frequency/dds.h b/drivers/staging/iio/frequency/dds.h
index 611e2b0..fe53e732 100644
--- a/drivers/staging/iio/frequency/dds.h
+++ b/drivers/staging/iio/frequency/dds.h
@@ -5,6 +5,8 @@
*
* Licensed under the GPL-2 or later.
*/
+#ifndef IIO_DDS_H_
+#define IIO_DDS_H_
/**
* /sys/bus/iio/devices/.../out_altvoltageX_frequencyY
@@ -108,3 +110,5 @@
#define IIO_CONST_ATTR_OUT_WAVETYPES_AVAILABLE(_channel, _output, _modes)\
IIO_CONST_ATTR( \
out_altvoltage##_channel##_out##_output##_wavetype_available, _modes)
+
+#endif /* IIO_DDS_H_ */
diff --git a/drivers/staging/iio/meter/meter.h b/drivers/staging/iio/meter/meter.h
index 8f0de02..dfba510 100644
--- a/drivers/staging/iio/meter/meter.h
+++ b/drivers/staging/iio/meter/meter.h
@@ -1,3 +1,6 @@
+#ifndef _METER_H
+#define _METER_H
+
#include <linux/iio/sysfs.h>
/* metering ic types of attribute */
@@ -394,3 +397,4 @@
#define IIO_EVENT_ATTR_VPKLVL_EXC(_evlist, _show, _store, _mask) \
IIO_EVENT_ATTR_SH(vpklvl_exc, _evlist, _show, _store, _mask)
+#endif /* _METER_H */
diff --git a/drivers/staging/iio/resolver/ad2s1210.h b/drivers/staging/iio/resolver/ad2s1210.h
index aec0bdca..c7158f6 100644
--- a/drivers/staging/iio/resolver/ad2s1210.h
+++ b/drivers/staging/iio/resolver/ad2s1210.h
@@ -8,6 +8,8 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+#ifndef _AD2S1210_H
+#define _AD2S1210_H
struct ad2s1210_platform_data {
unsigned sample;
@@ -15,3 +17,4 @@ struct ad2s1210_platform_data {
unsigned res[2];
bool gpioin;
};
+#endif /* _AD2S1210_H */
--
1.9.1
reply other threads:[~2015-03-04 0:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150304003715.GA15492@Inspiron \
--to=cristina.opriceana@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/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.