aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-02-12 16:03:11 -0500
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-03-21 04:50:56 -0400
commite7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e (patch)
treef8aaed7657f3b7af86cdf2b5eade135e0f9f740b /include/linux/mtd
parent8f347c4232d5fc097599b711a3385722a6834005 (diff)
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 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 4cbb7f555244..a86c4fa93115 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -30,12 +30,6 @@
30 30
31#include <asm/div64.h> 31#include <asm/div64.h>
32 32
33#define MTD_ERASE_PENDING 0x01
34#define MTD_ERASING 0x02
35#define MTD_ERASE_SUSPEND 0x04
36#define MTD_ERASE_DONE 0x08
37#define MTD_ERASE_FAILED 0x10
38
39#define MTD_FAIL_ADDR_UNKNOWN -1LL 33#define MTD_FAIL_ADDR_UNKNOWN -1LL
40 34
41struct mtd_info; 35struct mtd_info;
@@ -49,7 +43,6 @@ struct erase_info {
49 uint64_t addr; 43 uint64_t addr;
50 uint64_t len; 44 uint64_t len;
51 uint64_t fail_addr; 45 uint64_t fail_addr;
52 u_char state;
53}; 46};
54 47
55struct mtd_erase_region_info { 48struct mtd_erase_region_info {
@@ -589,8 +582,6 @@ extern void register_mtd_user (struct mtd_notifier *new);
589extern int unregister_mtd_user (struct mtd_notifier *old); 582extern int unregister_mtd_user (struct mtd_notifier *old);
590void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size); 583void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
591 584
592void mtd_erase_callback(struct erase_info *instr);
593
594static inline int mtd_is_bitflip(int err) { 585static inline int mtd_is_bitflip(int err) {
595 return err == -EUCLEAN; 586 return err == -EUCLEAN;
596} 587}