[U-Boot] [PATCH 04/49] i2c: use __weak

Jeroen Hofstee jeroen at myspectrum.nl
Wed Oct 8 22:57:24 CEST 2014


Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>
---
 arch/arm/cpu/arm926ejs/cache.c | 5 +----
 drivers/i2c/i2c_core.c         | 4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index e86c2ed..8d7873c 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -99,7 +99,4 @@ void flush_cache(unsigned long start, unsigned long size)
 /*
  * Stub implementations for l2 cache operations
  */
-void __l2_cache_disable(void) {}
-
-void l2_cache_disable(void)
-	__attribute__((weak, alias("__l2_cache_disable")));
+__weak void l2_cache_disable(void) {}
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