[PATCH] PCA953x : Fix compilation warning.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The platform data structure defined in pca953x header file
includes references to i2c data structures. Unless the i2c.h
file is included ahead of pca953x.h, compiler warning would
be generated wherever pca953x header file is included. Added
i2c.h to the pca953x.h itself to remove this dependency.

Also included conditional compile macros to guard against
multiple inclusion.

Signed-off-by: Sriramakrishnan <srk@xxxxxx>
---
 include/linux/i2c/pca953x.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h
index 81736d6..1284a2d 100644
--- a/include/linux/i2c/pca953x.h
+++ b/include/linux/i2c/pca953x.h
@@ -1,3 +1,8 @@
+#ifndef __LINUX_PCA953X_H
+#define __LINUX_PCA953X_H
+
+#include <linux/i2c.h>
+
 /* platform data for the PCA9539 16-bit I/O expander driver */
 
 struct pca953x_platform_data {
@@ -17,3 +22,4 @@ struct pca953x_platform_data {
 				void *context);
 	char		**names;
 };
+#endif
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux