diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/mtd.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index f38e8276b408..56478eb4bbc0 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -182,6 +182,8 @@ struct mtd_info { unsigned long len, unsigned long offset, unsigned long flags); + int (*read) (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf); /* Backing device capabilities for this device * - provides mmap capabilities @@ -189,7 +191,6 @@ struct mtd_info { struct backing_dev_info *backing_dev_info; - int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); /* In blackbox flight recorder like scenarios we want to make successful @@ -301,6 +302,12 @@ static inline unsigned long mtd_get_unmapped_area(struct mtd_info *mtd, return mtd->get_unmapped_area(mtd, len, offset, flags); } +static inline int mtd_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) +{ + return mtd->read(mtd, from, len, retlen, buf); +} + static inline struct mtd_info *dev_to_mtd(struct device *dev) { return dev ? dev_get_drvdata(dev) : NULL; |