Patchwork [4/8] mtd: m25p80: drop wait-till-ready checks

login
register
mail settings
Submitter Brian Norris
Date Aug. 7, 2014, 1:16 a.m.
Message ID <1407374222-8448-5-git-send-email-computersforpeace@gmail.com>
Download mbox | patch
Permalink /patch/377701/
State Accepted
Headers show

Comments

Brian Norris - Aug. 7, 2014, 1:16 a.m.
spi-nor.c should be taking care of these now.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/devices/m25p80.c | 12 ------------
 1 file changed, 12 deletions(-)
Marek Vasut - Aug. 7, 2014, 2:24 p.m.
On Thursday, August 07, 2014 at 03:16:58 AM, Brian Norris wrote:
> spi-nor.c should be taking care of these now.
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

Patch

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index ed7e0a1bed3c..96226ea69f90 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -129,12 +129,6 @@  static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len,
 	struct spi_transfer t[2];
 	struct spi_message m;
 	int dummy = nor->read_dummy;
-	int ret;
-
-	/* Wait till previous write/erase is done. */
-	ret = nor->wait_till_ready(nor);
-	if (ret)
-		return ret;
 
 	spi_message_init(&m);
 	memset(t, 0, (sizeof t));
@@ -160,16 +154,10 @@  static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len,
 static int m25p80_erase(struct spi_nor *nor, loff_t offset)
 {
 	struct m25p *flash = nor->priv;
-	int ret;
 
 	dev_dbg(nor->dev, "%dKiB at 0x%08x\n",
 		flash->mtd.erasesize / 1024, (u32)offset);
 
-	/* Wait until finished previous write command. */
-	ret = nor->wait_till_ready(nor);
-	if (ret)
-		return ret;
-
 	/* Send write enable, then erase commands. */
 	ret = nor->write_reg(nor, SPINOR_OP_WREN, NULL, 0, 0);
 	if (ret)