]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
soft_i2c.c compiler/linker error
authorJens Scharsig <esw@bus-elektronik.de>
Tue, 31 Mar 2009 06:18:29 +0000 (08:18 +0200)
committerHeiko Schocher <hs@denx.de>
Tue, 31 Mar 2009 06:29:50 +0000 (08:29 +0200)
This patch fix the compiler/linker errors

common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'

if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not
uesd/undef (wrong define order)

and

removes additional empty lines

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
drivers/i2c/soft_i2c.c

index ed5f5b26949e837e1beff5000f2f0643eb7458f6..185634d51003d4a3512b52f050f15a20d5dc0fb7 100644 (file)
 DECLARE_GLOBAL_DATA_PTR;
 #endif
 
-
 /*-----------------------------------------------------------------------
  * Definitions
  */
 
 #define RETRIES                0
 
-
 #define I2C_ACK                0               /* PD_SDA level to ack a byte */
 #define I2C_NOACK      1               /* PD_SDA level to noack a byte */
 
@@ -154,7 +152,6 @@ static void send_stop(void)
        I2C_TRISTATE;
 }
 
-
 /*-----------------------------------------------------------------------
  * ack should be I2C_ACK or I2C_NOACK
  */
@@ -174,7 +171,6 @@ static void send_ack(int ack)
        I2C_DELAY;
 }
 
-
 /*-----------------------------------------------------------------------
  * Send 8 bits and look for an acknowledgement.
  */
@@ -246,6 +242,7 @@ int i2c_set_bus_num(unsigned int bus)
 #endif
        return 0;
 }
+#endif
 
 /* TODO: add 100/400k switching */
 unsigned int i2c_get_bus_speed(void)
@@ -260,7 +257,6 @@ int i2c_set_bus_speed(unsigned int speed)
 
        return 0;
 }
-#endif
 
 /*-----------------------------------------------------------------------
  * if ack == I2C_ACK, ACK the byte so can continue reading, else