[U-Boot] [PATCH v2, rebased 1/3] i2c: use __weak

Jeroen Hofstee jeroen at myspectrum.nl
Mon Oct 27 20:10:05 CET 2014


Acked-by: Heiko Schocher <hs at denx.de>
Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>
---
 drivers/i2c/i2c_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 18d6736..7f63987 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -395,9 +395,7 @@ void i2c_reg_write(uint8_t addr, uint8_t reg, uint8_t val)
 	i2c_write(addr, reg, 1, &val, 1);
 }
 
-void __i2c_init(int speed, int slaveaddr)
+__weak void i2c_init(int speed, int slaveaddr)
 {
 	i2c_init_bus(i2c_get_bus_num(), speed, slaveaddr);
 }
-void i2c_init(int speed, int slaveaddr)
-	__attribute__((weak, alias("__i2c_init")));
-- 
2.1.0



More information about the U-Boot mailing list