From: Pavel Herrmann Date: Fri, 28 Sep 2012 11:18:03 +0200 Subject: [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix In-Reply-To: <1347796413-15515-1-git-send-email-morpheus.ibis@gmail.com> References: <1347796413-15515-1-git-send-email-morpheus.ibis@gmail.com> Message-ID: <1348823884-17187-1-git-send-email-morpheus.ibis@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We set sata_curr_device to 0 right after returning from init_sata(), so there's no point in setting it to the last scanned driver at this point. Note: there are more duplicities with cmd_sata, but those might be required, as the code seems to reset the entire controller on every scan, ignoring the requested port number. Signed-off-by: Pavel Herrmann --- drivers/block/ata_piix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c index c81d11a..1c3ab8a 100644 --- a/drivers/block/ata_piix.c +++ b/drivers/block/ata_piix.c @@ -204,9 +204,6 @@ init_sata (int dev) dev_print (&sata_dev_desc[devno]); /* initialize partition type */ init_part (&sata_dev_desc[devno]); - if (sata_curr_device < 0) - sata_curr_device = - i * CONFIG_SYS_SATA_DEVS_PER_BUS + j; } } } -- 1.7.12