diff options
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r-- | include/linux/mtd/mtd.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 201bad557047..ca7bfdaf7a6f 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -175,11 +175,8 @@ struct mtd_info { | |||
175 | * wrappers instead. | 175 | * wrappers instead. |
176 | */ | 176 | */ |
177 | int (*erase) (struct mtd_info *mtd, struct erase_info *instr); | 177 | int (*erase) (struct mtd_info *mtd, struct erase_info *instr); |
178 | |||
179 | /* This stuff for eXecute-In-Place */ | ||
180 | /* phys is optional and may be set to NULL */ | ||
181 | int (*point) (struct mtd_info *mtd, loff_t from, size_t len, | 178 | int (*point) (struct mtd_info *mtd, loff_t from, size_t len, |
182 | size_t *retlen, void **virt, resource_size_t *phys); | 179 | size_t *retlen, void **virt, resource_size_t *phys); |
183 | 180 | ||
184 | /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ | 181 | /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ |
185 | void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len); | 182 | void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len); |
@@ -283,6 +280,15 @@ static inline int mtd_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
283 | return mtd->erase(mtd, instr); | 280 | return mtd->erase(mtd, instr); |
284 | } | 281 | } |
285 | 282 | ||
283 | /* | ||
284 | * This stuff for eXecute-In-Place. phys is optional and may be set to NULL. | ||
285 | */ | ||
286 | static inline int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, | ||
287 | size_t *retlen, void **virt, resource_size_t *phys) | ||
288 | { | ||
289 | return mtd->point(mtd, from, len, retlen, virt, phys); | ||
290 | } | ||
291 | |||
286 | static inline struct mtd_info *dev_to_mtd(struct device *dev) | 292 | static inline struct mtd_info *dev_to_mtd(struct device *dev) |
287 | { | 293 | { |
288 | return dev ? dev_get_drvdata(dev) : NULL; | 294 | return dev ? dev_get_drvdata(dev) : NULL; |