common: env_mmc: Use __weak annotation to simplify code
Using the __weak annotation can make the code cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
0f3073433c
commit
b56540801f
@ -46,13 +46,11 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
#define CONFIG_ENV_OFFSET 0
|
#define CONFIG_ENV_OFFSET 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
|
__weak int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
|
||||||
{
|
{
|
||||||
*env_addr = CONFIG_ENV_OFFSET;
|
*env_addr = CONFIG_ENV_OFFSET;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
|
|
||||||
__attribute__((weak, alias("__mmc_get_env_addr")));
|
|
||||||
|
|
||||||
int env_init(void)
|
int env_init(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user