From: Jagan Teki Date: Wed, 2 Sep 2015 06:09:46 +0000 (+0530) Subject: sf: Return bank_sel, if flash->bank_curr == bank_sel X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3c75ade2b38ea987b79b7ef74d64301b49aa306d;p=u-boot.git sf: Return bank_sel, if flash->bank_curr == bank_sel If computed bank_sel is same as flash->bank_curr which is computed at probe time, then return the bank_sel instead of zero. Cc: Michal Simek Cc: Siva Durga Prasad Paladugu Signed-off-by: Jagan Teki --- diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 900ec1f2a9..b33fe5a1b2 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -102,7 +102,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;