public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] post, i2c: add missing curly bracket in i2c_post_test
Date: Mon, 15 Nov 2010 08:34:25 +0100	[thread overview]
Message-ID: <1289806465-5518-1-git-send-email-hs@denx.de> (raw)

If CONFIG_SYS_POST_I2C_ADDRS is not defined and CONFIG_SYS_POST_I2C
is activated, i2c_probe() is not called in the for statement,
because missing curly bracket.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 post/drivers/i2c.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c
index 4a1b1a4..4cbd9f3 100644
--- a/post/drivers/i2c.c
+++ b/post/drivers/i2c.c
@@ -63,11 +63,12 @@ int i2c_post_test (int flags)
 	unsigned int i;
 #ifndef CONFIG_SYS_POST_I2C_ADDRS
 	/* Start at address 1, address 0 is the general call address */
-	for (i = 1; i < 128; i++)
+	for (i = 1; i < 128; i++) {
 		if (i2c_ignore_device(i))
 			continue;
 		if (i2c_probe (i) == 0)
 			return 0;
+	}
 
 	/* No devices found */
 	return -1;
-- 
1.7.2.3

             reply	other threads:[~2010-11-15  7:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15  7:34 Heiko Schocher [this message]
2010-11-18 18:45 ` [U-Boot] [PATCH] post, i2c: add missing curly bracket in i2c_post_test Heiko Schocher

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=1289806465-5518-1-git-send-email-hs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox