* [PATCH] PCA953x : Fix compilation warning.
@ 2010-02-25 13:32 Sriramakrishnan
[not found] ` <1267104758-32131-1-git-send-email-srk-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Sriramakrishnan @ 2010-02-25 13:32 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-omap, Sriramakrishnan
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@ti.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCA953x : Fix compilation warning.
[not found] ` <1267104758-32131-1-git-send-email-srk-l0cyMroinI0@public.gmane.org>
@ 2010-02-25 14:27 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2010-02-25 14:27 UTC (permalink / raw)
To: Sriramakrishnan
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
On Thu, 25 Feb 2010 19:02:38 +0530, Sriramakrishnan wrote:
> 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-l0cyMroinI0@public.gmane.org>
> ---
> 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
Olof Johansson already sent a patch fixing this:
http://lkml.org/lkml/2010/1/5/327
Andrew Morton accepted this patch so it should go to Linus during the
next merge window (that is, within the next 2 weeks.)
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-25 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 13:32 [PATCH] PCA953x : Fix compilation warning Sriramakrishnan
[not found] ` <1267104758-32131-1-git-send-email-srk-l0cyMroinI0@public.gmane.org>
2010-02-25 14:27 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).