aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/mtd.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-02-12 05:40:00 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-03-24 05:00:19 -0400
commit402d326519c1a4859c527702383f4e60f606ef52 (patch)
treebeb302d56d7671d372ae73f2664feed2a5b1226d /include/linux/mtd/mtd.h
parent9ce969082e490d0a5a81862b364337c93dc3482a (diff)
NOMMU: Present backing device capabilities for MTD chardevs
Present backing device capabilities for MTD character device files to allow NOMMU mmap to do direct mapping where possible. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r--include/linux/mtd/mtd.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 3aa5d77c2cdb..0c079fd307a5 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -162,6 +162,20 @@ struct mtd_info {
162 /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ 162 /* We probably shouldn't allow XIP if the unpoint isn't a NULL */
163 void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len); 163 void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len);
164 164
165 /* Allow NOMMU mmap() to directly map the device (if not NULL)
166 * - return the address to which the offset maps
167 * - return -ENOSYS to indicate refusal to do the mapping
168 */
169 unsigned long (*get_unmapped_area) (struct mtd_info *mtd,
170 unsigned long len,
171 unsigned long offset,
172 unsigned long flags);
173
174 /* Backing device capabilities for this device
175 * - provides mmap capabilities
176 */
177 struct backing_dev_info *backing_dev_info;
178
165 179
166 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); 180 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
167 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); 181 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);