diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-10-05 15:56:06 +0200 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-10-23 15:47:33 +0530 |
commit | 0d1ecc99cb59c2190257f7738f91db21f174dc02 (patch) | |
tree | bd610819dcce9dd95ff9c8e43411c53986abbf31 /include/linux/mtd | |
parent | a60397d219c2ddbceedfea4e121e303804d333d0 (diff) | |
download | u-boot-0d1ecc99cb59c2190257f7738f91db21f174dc02.tar.gz u-boot-0d1ecc99cb59c2190257f7738f91db21f174dc02.tar.bz2 u-boot-0d1ecc99cb59c2190257f7738f91db21f174dc02.zip |
mtd: Remove mtd_erase_callback() entirely
The original purpose of mtd_erase_callback() in Linux at the time it was
imported to U-Boot, was to inform the caller that erasing is done (since
it was an asynchronous operation).
All supplied callback methods in U-Boot do nothing, but the
mtd_erase_callback() function was (until previous patch) grossly abused
in U-Boot's mtdpart implementation for completely different purpose.
Since we got rid of the abusement, remove the mtd_erase_callback()
function and the .callback member from struct erase_info entirely, in
order to avoid such problems in the future.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/mtd.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 3b302fb8c3..7455400981 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -51,7 +51,6 @@ struct erase_info { u_long retries; unsigned dev; unsigned cell; - void (*callback) (struct erase_info *self); u_long priv; u_char state; struct erase_info *next; @@ -535,16 +534,6 @@ extern int unregister_mtd_user (struct mtd_notifier *old); #endif void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size); -#ifdef CONFIG_MTD_PARTITIONS -void mtd_erase_callback(struct erase_info *instr); -#else -static inline void mtd_erase_callback(struct erase_info *instr) -{ - if (instr->callback) - instr->callback(instr); -} -#endif - static inline int mtd_is_bitflip(int err) { return err == -EUCLEAN; } |