012-export_erase_write.patch 768 B

1234567891011121314151617181920212223
  1. --- a/drivers/mtd/mtdblock.c
  2. +++ b/drivers/mtd/mtdblock.c
  3. @@ -63,7 +63,7 @@ static void erase_callback(struct erase_
  4. wake_up(wait_q);
  5. }
  6. -static int erase_write (struct mtd_info *mtd, unsigned long pos,
  7. +int erase_write (struct mtd_info *mtd, unsigned long pos,
  8. int len, const char *buf)
  9. {
  10. struct erase_info erase;
  11. --- a/include/linux/mtd/mtd.h
  12. +++ b/include/linux/mtd/mtd.h
  13. @@ -416,6 +416,9 @@ extern void register_mtd_user (struct mt
  14. extern int unregister_mtd_user (struct mtd_notifier *old);
  15. void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
  16. +int erase_write (struct mtd_info *mtd, unsigned long pos,
  17. + int len, const char *buf);
  18. +
  19. void mtd_erase_callback(struct erase_info *instr);
  20. static inline int mtd_is_bitflip(int err) {