aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-23 10:05:52 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:25:17 -0500
commit7219778ad9c18cc2c05c7fca0abe026afbc19dfb (patch)
tree509a11bf7f7ebeef9a4236901adf53e507d1455b /include
parentd35ea200c0fb5315f16fb2599a4bafd9c1a7b386 (diff)
mtd: introduce mtd_unpoint interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include')
-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;