summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-02-13 00:03:09 +0300
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-03-15 20:21:07 +0300
commit884cfd9023ce6afe8bcf181ec988d8516eb32bf0 (patch)
treef57f5eafe52a568ac90e25b64f8e6a0e9d37e993 /drivers/mtd/mtdpart.c
parentdcba51bbb9e0cc7f80d36eb20a033a4dff2ce9cc (diff)
downloadlinux-884cfd9023ce6afe8bcf181ec988d8516eb32bf0.tar.xz
mtd: Stop assuming mtd_erase() is asynchronous
None of the mtd->_erase() implementations work in an asynchronous manner, so let's simplify MTD users that call mtd_erase(). All they need to do is check the value returned by mtd_erase() and assume that != 0 means failure. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 76cd21d1171b..ae1206633d9d 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -222,8 +222,6 @@ void mtd_erase_callback(struct erase_info *instr)
instr->fail_addr -= part->offset;
instr->addr -= part->offset;
}
- if (instr->callback)
- instr->callback(instr);
}
EXPORT_SYMBOL_GPL(mtd_erase_callback);