public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cmd_mmc: make curr_device static
@ 2009-06-15  1:35 Mike Frysinger
  2009-06-15  1:35 ` [U-Boot] [PATCH] sata: namespace curr_device variable Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-15  1:35 UTC (permalink / raw)
  To: u-boot

The curr_device variable isn't used outside of cmd_mmc, so mark it static
to avoid conflicts with other pieces of code (like sata which also exports
a curr_device).  Otherwise we end up with stuff like:
common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
	multiple definition of `curr_device'
common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 common/cmd_mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 32fe49b..0e3393b 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -26,7 +26,7 @@
 #include <mmc.h>
 
 #ifndef CONFIG_GENERIC_MMC
-int curr_device = -1;
+static int curr_device = -1;
 
 int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
-- 
1.6.3.1

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

end of thread, other threads:[~2009-07-17 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15  1:35 [U-Boot] [PATCH] cmd_mmc: make curr_device static Mike Frysinger
2009-06-15  1:35 ` [U-Boot] [PATCH] sata: namespace curr_device variable Mike Frysinger
2009-07-17 20:15   ` Wolfgang Denk
2009-07-15 15:09 ` [U-Boot] [PATCH] cmd_mmc: make curr_device static Mike Frysinger
2009-07-17 20:16   ` Wolfgang Denk
2009-07-17 20:14 ` Wolfgang Denk

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