diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 5d4482512e36..35e7e9896b17 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -129,16 +129,10 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len, | |||
129 | struct spi_transfer t[2]; | 129 | struct spi_transfer t[2]; |
130 | struct spi_message m; | 130 | struct spi_message m; |
131 | unsigned int dummy = nor->read_dummy; | 131 | unsigned int dummy = nor->read_dummy; |
132 | int ret; | ||
133 | 132 | ||
134 | /* convert the dummy cycles to the number of bytes */ | 133 | /* convert the dummy cycles to the number of bytes */ |
135 | dummy /= 8; | 134 | dummy /= 8; |
136 | 135 | ||
137 | /* Wait till previous write/erase is done. */ | ||
138 | ret = nor->wait_till_ready(nor); | ||
139 | if (ret) | ||
140 | return ret; | ||
141 | |||
142 | spi_message_init(&m); | 136 | spi_message_init(&m); |
143 | memset(t, 0, (sizeof t)); | 137 | memset(t, 0, (sizeof t)); |
144 | 138 | ||
@@ -168,11 +162,6 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset) | |||
168 | dev_dbg(nor->dev, "%dKiB at 0x%08x\n", | 162 | dev_dbg(nor->dev, "%dKiB at 0x%08x\n", |
169 | flash->mtd.erasesize / 1024, (u32)offset); | 163 | flash->mtd.erasesize / 1024, (u32)offset); |
170 | 164 | ||
171 | /* Wait until finished previous write command. */ | ||
172 | ret = nor->wait_till_ready(nor); | ||
173 | if (ret) | ||
174 | return ret; | ||
175 | |||
176 | /* Send write enable, then erase commands. */ | 165 | /* Send write enable, then erase commands. */ |
177 | ret = nor->write_reg(nor, SPINOR_OP_WREN, NULL, 0, 0); | 166 | ret = nor->write_reg(nor, SPINOR_OP_WREN, NULL, 0, 0); |
178 | if (ret) | 167 | if (ret) |