All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [POWERPC] mgsuvd: fix compiler warning when using soft_i2c driver
Date: Thu, 16 Oct 2008 19:11:42 +0200	[thread overview]
Message-ID: <48F775CE.2020203@denx.de> (raw)

following patch solves the compiler warning for the
mgsuvd board, using the soft_i2c driver:

[hs at pollux u-boot]$ ./MAKEALL mgsuvd
Configuring for mgsuvd board...
soft_i2c.c: In function 'write_byte':
soft_i2c.c:209: warning: implicit declaration of function 'i2c_soft_read_pin'
   text    data     bss     dec     hex filename
 174608    9712   28436  212756   33f14 ./u-boot
[hs at pollux u-boot]$

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 drivers/i2c/soft_i2c.c   |    2 ++
 include/configs/mgsuvd.h |    1 +
 include/i2c.h            |    4 ++++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 0a9feb6..346125e 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -41,6 +41,8 @@
 #endif
 #include <i2c.h>

+CONFIG_I2C_SOFT_EXTERN
+
 /* #define	DEBUG_I2C	*/

 #ifdef DEBUG_I2C
diff --git a/include/configs/mgsuvd.h b/include/configs/mgsuvd.h
index 4ecaeac..2171115 100644
--- a/include/configs/mgsuvd.h
+++ b/include/configs/mgsuvd.h
@@ -356,6 +356,7 @@

 #define I2C_ACTIVE	do {} while (0)
 #define I2C_TRISTATE	do {} while (0)
+#define CONFIG_I2C_SOFT_EXTERN	extern int i2c_soft_read_pin (void);
 #define I2C_READ	i2c_soft_read_pin ()
 #define I2C_SDA(bit)	if(bit) { \
 				*(unsigned short *)(I2C_BASE_DIR) &=  ~SDA_CONF; \
diff --git a/include/i2c.h b/include/i2c.h
index 9f771dd..24d535f 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -76,6 +76,10 @@
 #  define I2C_SOFT_DECLARATIONS
 # endif
 #endif
+
+#ifndef CONFIG_I2C_SOFT_EXTERN
+#define CONFIG_I2C_SOFT_EXTERN
+#endif
 /*
  * Initialization, must be called once on start up, may be called
  * repeatedly to change the speed and slave addresses.
-- 
1.5.6.1

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

             reply	other threads:[~2008-10-16 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16 17:11 Heiko Schocher [this message]
2008-10-16 21:41 ` [U-Boot] [POWERPC] mgsuvd: fix compiler warning when using soft_i2c driver Wolfgang Denk

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=48F775CE.2020203@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.