linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sriramakrishnan <srk@ti.com>
To: linux-i2c@vger.kernel.org
Cc: linux-omap@vger.kernel.org, Sriramakrishnan <srk@ti.com>
Subject: [PATCH] PCA953x : Fix compilation warning.
Date: Thu, 25 Feb 2010 19:02:38 +0530	[thread overview]
Message-ID: <1267104758-32131-1-git-send-email-srk@ti.com> (raw)

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


             reply	other threads:[~2010-02-25 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 13:32 Sriramakrishnan [this message]
     [not found] ` <1267104758-32131-1-git-send-email-srk-l0cyMroinI0@public.gmane.org>
2010-02-25 14:27   ` [PATCH] PCA953x : Fix compilation warning Jean Delvare

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=1267104758-32131-1-git-send-email-srk@ti.com \
    --to=srk@ti.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-omap@vger.kernel.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 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).