From 569460ebf14b87bd8fdb2352bde95d35ee96e13b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 14 Jun 2009 21:35:22 -0400 Subject: 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 --- drivers/block/ata_piix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/block') diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c index ec3768711..549de3123 100644 --- a/drivers/block/ata_piix.c +++ b/drivers/block/ata_piix.c @@ -36,7 +36,7 @@ #include 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 @@ init_sata (int dev) 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; } } -- cgit v1.2.3