aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index ca7bfdaf7a6f..a7d22b7fcb4c 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -177,8 +177,6 @@ struct mtd_info {
177 int (*erase) (struct mtd_info *mtd, struct erase_info *instr); 177 int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
178 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,
179 size_t *retlen, void **virt, resource_size_t *phys); 179 size_t *retlen, void **virt, resource_size_t *phys);
180
181 /* We probably shouldn't allow XIP if the unpoint isn't a NULL */
182 void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len); 180 void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len);
183 181
184 /* Allow NOMMU mmap() to directly map the device (if not NULL) 182 /* Allow NOMMU mmap() to directly map the device (if not NULL)
@@ -289,6 +287,12 @@ static inline int mtd_point(struct mtd_info *mtd, loff_t from, size_t len,
289 return mtd->point(mtd, from, len, retlen, virt, phys); 287 return mtd->point(mtd, from, len, retlen, virt, phys);
290} 288}
291 289
290/* We probably shouldn't allow XIP if the unpoint isn't a NULL */
291static inline void mtd_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
292{
293 return mtd->unpoint(mtd, from, len);
294}
295
292static inline struct mtd_info *dev_to_mtd(struct device *dev) 296static inline struct mtd_info *dev_to_mtd(struct device *dev)
293{ 297{
294 return dev ? dev_get_drvdata(dev) : NULL; 298 return dev ? dev_get_drvdata(dev) : NULL;