diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2012-10-09 10:08:10 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-10-09 10:08:42 -0400 |
commit | f5cf8f07423b2677cebebcebc863af77223a4972 (patch) | |
tree | d29db1e640937a02a827a01628f88b03f20f9239 /drivers/mtd | |
parent | ffe315012510165ce82e4dd4767f0a5dba9edbf7 (diff) |
mtd: Disable mtdchar mmap on MMU systems
This code was broken because it assumed that all MTD devices were map-based.
Disable it for now, until it can be fixed properly for the next merge window.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtdchar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 73ae81a629f2..82c06165d3d2 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -1162,7 +1162,11 @@ static int mtdchar_mmap(struct file *file, struct vm_area_struct *vma) | |||
1162 | resource_size_t start, off; | 1162 | resource_size_t start, off; |
1163 | unsigned long len, vma_len; | 1163 | unsigned long len, vma_len; |
1164 | 1164 | ||
1165 | if (mtd->type == MTD_RAM || mtd->type == MTD_ROM) { | 1165 | /* This is broken because it assumes the MTD device is map-based |
1166 | and that mtd->priv is a valid struct map_info. It should be | ||
1167 | replaced with something that uses the mtd_get_unmapped_area() | ||
1168 | operation properly. */ | ||
1169 | if (0 /*mtd->type == MTD_RAM || mtd->type == MTD_ROM*/) { | ||
1166 | off = get_vm_offset(vma); | 1170 | off = get_vm_offset(vma); |
1167 | start = map->phys; | 1171 | start = map->phys; |
1168 | len = PAGE_ALIGN((start & ~PAGE_MASK) + map->size); | 1172 | len = PAGE_ALIGN((start & ~PAGE_MASK) + map->size); |