]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
post, i2c: add missing curly bracket in i2c_post_test
authorHeiko Schocher <hs@denx.de>
Mon, 15 Nov 2010 07:20:39 +0000 (08:20 +0100)
committerHeiko Schocher <hs@denx.de>
Wed, 17 Nov 2010 07:04:03 +0000 (08:04 +0100)
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

index 4a1b1a49d17bd481e401070ad44b78d69779638b..4cbd9f3703f8f2b9f47cf9ad0626a2dbdbf281dc 100644 (file)
@@ -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 */
        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;
                if (i2c_ignore_device(i))
                        continue;
                if (i2c_probe (i) == 0)
                        return 0;
+       }
 
        /* No devices found */
        return -1;
 
        /* No devices found */
        return -1;