aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/altera_qspi.c
diff options
context:
space:
mode:
authorThomas Chou2015-12-23 10:26:03 +0800
committerThomas Chou2015-12-28 09:32:43 +0800
commit9e957aa4ce959faa89d31bc3ff401cc08bbc1013 (patch)
tree33a683e3278cce6d58b417905ee5abadad9023db /drivers/mtd/altera_qspi.c
parent78680314c53a95c0bb25e942662979843b60d7b9 (diff)
altera_qspi: call callback even if the erase failed
Erase is an asynchronous operation. Device drivers are supposed to call instr->callback() whenever the operation completes, even if it completes with a failure. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Diffstat (limited to 'drivers/mtd/altera_qspi.c')
-rw-r--r--drivers/mtd/altera_qspi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index c7e37add018..627a8ccee37 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -146,6 +146,7 @@ static int altera_qspi_erase(struct mtd_info *mtd, struct erase_info *instr)
debug("erase %08x fail %x\n", sect, stat);
writel(stat, &regs->isr); /* clear isr */
instr->state = MTD_ERASE_FAILED;
+ mtd_erase_callback(instr);
return -EIO;
}
addr += mtd->erasesize;