public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code
@ 2013-01-08 15:36 Fabio Estevam
  2013-01-08 15:57 ` Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2013-01-08 15:36 UTC (permalink / raw)
  To: u-boot

Using the __weak annotation can make the code cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 common/env_mmc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/common/env_mmc.c b/common/env_mmc.c
index ce21671..02bd5ae 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -46,13 +46,11 @@ DECLARE_GLOBAL_DATA_PTR;
 #define CONFIG_ENV_OFFSET 0
 #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;
 	return 0;
 }
-int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
-	__attribute__((weak, alias("__mmc_get_env_addr")));
 
 int env_init(void)
 {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-04 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 15:36 [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code Fabio Estevam
2013-01-08 15:57 ` Marek Vasut
2013-01-28  5:54 ` Stefano Babic
2013-02-04 16:37 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox