From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Sun, 16 Aug 2015 14:13:45 +0530 Subject: [U-Boot] [PATCH 2/6] sf: Return proper bank_sel, if flash->bank_curr == bank_sel In-Reply-To: <1439714629-6003-1-git-send-email-jteki@openedev.com> References: <1439714629-6003-1-git-send-email-jteki@openedev.com> Message-ID: <1439714629-6003-3-git-send-email-jteki@openedev.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If computed bank_sel is same as flash->bank_curr which is computed at probe time, then return the bank_sel instead of zero. Signed-off-by: Jagan Teki Cc: Michal Simek Cc: Siva Durga Prasad Paladugu --- drivers/mtd/spi/sf_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 38592f5..5cb4ef6 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -101,7 +101,7 @@ static int spi_flash_cmd_bankaddr_write(struct spi_flash *flash, u8 bank_sel) if (flash->bank_curr == bank_sel) { debug("SF: not require to enable bank%d\n", bank_sel); - return 0; + return bank_sel; } cmd = flash->bank_write_cmd; -- 1.9.1