diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-02-13 00:03:11 +0300 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-03-21 11:50:56 +0300 |
commit | e7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e (patch) | |
tree | f8aaed7657f3b7af86cdf2b5eade135e0f9f740b /drivers/mtd/devices/bcm47xxsflash.c | |
parent | 8f347c4232d5fc097599b711a3385722a6834005 (diff) | |
download | linux-e7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e.tar.xz |
mtd: Stop updating erase_info->state and calling mtd_erase_callback()
MTD users are no longer checking erase_info->state to determine if the
erase operation failed or succeeded. Moreover, mtd_erase_callback() is
now a NOP.
We can safely get rid of all mtd_erase_callback() calls and all
erase_info->state assignments. While at it, get rid of the
erase_info->state field, all MTD_ERASE_XXX definitions and the
mtd_erase_callback() function.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Bert Kenward <bkenward@solarflare.com>
---
Changes in v2:
- Address a few coding style issues (reported by Miquel)
- Remove comments that are no longer valid (reported by Miquel)
Diffstat (limited to 'drivers/mtd/devices/bcm47xxsflash.c')
-rw-r--r-- | drivers/mtd/devices/bcm47xxsflash.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c index 6b84947cfbea..9baa81b8780c 100644 --- a/drivers/mtd/devices/bcm47xxsflash.c +++ b/drivers/mtd/devices/bcm47xxsflash.c @@ -68,7 +68,6 @@ static int bcm47xxsflash_poll(struct bcm47xxsflash *b47s, int timeout) static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase) { struct bcm47xxsflash *b47s = mtd->priv; - int err; switch (b47s->type) { case BCM47XXSFLASH_TYPE_ST: @@ -89,13 +88,7 @@ static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase) break; } - err = bcm47xxsflash_poll(b47s, HZ); - if (err) - erase->state = MTD_ERASE_FAILED; - else - erase->state = MTD_ERASE_DONE; - - return err; + return bcm47xxsflash_poll(b47s, HZ); } static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len, |