sata: namespace curr_device variable
The curr_device variable really should be namespaced with a "sata_" prefix
since it is only used by the sata code. It also avoids random conflicts
with other pieces of code (like cmd_mmc):
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>
diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c
index ec37687..549de31 100644
--- a/drivers/block/ata_piix.c
+++ b/drivers/block/ata_piix.c
@@ -36,7 +36,7 @@
#include <ata.h>
extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-extern int curr_device;
+extern int sata_curr_device;
#define DEBUG_SATA 0 /*For debug prints set DEBUG_SATA to 1 */
@@ -204,8 +204,8 @@
dev_print (&sata_dev_desc[devno]);
/* initialize partition type */
init_part (&sata_dev_desc[devno]);
- if (curr_device < 0)
- curr_device =
+ if (sata_curr_device < 0)
+ sata_curr_device =
i * CONFIG_SYS_SATA_DEVS_PER_BUS + j;
}
}