summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-10-27 22:27:18 +0100
committerTom Rini <trini@ti.com>2014-11-04 15:00:55 -0500
commit13a8b7ae71449fdc6eb4df3a98abd0838637aa82 (patch)
tree2ff12cff8b669b51a5f76dea2eff5cdb024313f5 /drivers
parent0798082442536df2514ff272e8e53499a7dbc92e (diff)
downloadu-boot-imx-13a8b7ae71449fdc6eb4df3a98abd0838637aa82.zip
u-boot-imx-13a8b7ae71449fdc6eb4df3a98abd0838637aa82.tar.gz
u-boot-imx-13a8b7ae71449fdc6eb4df3a98abd0838637aa82.tar.bz2
i2c: use __weak
Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c_core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 18d6736..d34b749 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -229,11 +229,9 @@ static void i2c_init_bus(unsigned int bus_no, int speed, int slaveaddr)
}
/* implement possible board specific board init */
-static void __def_i2c_init_board(void)
+__weak void i2c_init_board(void)
{
}
-void i2c_init_board(void)
- __attribute__((weak, alias("__def_i2c_init_board")));
/*
* i2c_init_all():
@@ -395,9 +393,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")));