diff options
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 684bfa39e4ee..2147e733533b 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/mount.h> | 32 | #include <linux/mount.h> |
33 | #include <linux/blkpg.h> | 33 | #include <linux/blkpg.h> |
34 | #include <linux/magic.h> | 34 | #include <linux/magic.h> |
35 | #include <linux/major.h> | ||
35 | #include <linux/mtd/mtd.h> | 36 | #include <linux/mtd/mtd.h> |
36 | #include <linux/mtd/partitions.h> | 37 | #include <linux/mtd/partitions.h> |
37 | #include <linux/mtd/map.h> | 38 | #include <linux/mtd/map.h> |
@@ -1099,7 +1100,7 @@ static unsigned long mtdchar_get_unmapped_area(struct file *file, | |||
1099 | return (unsigned long) -EINVAL; | 1100 | return (unsigned long) -EINVAL; |
1100 | 1101 | ||
1101 | ret = mtd_get_unmapped_area(mtd, len, offset, flags); | 1102 | ret = mtd_get_unmapped_area(mtd, len, offset, flags); |
1102 | return ret == -EOPNOTSUPP ? -ENOSYS : ret; | 1103 | return ret == -EOPNOTSUPP ? -ENODEV : ret; |
1103 | } | 1104 | } |
1104 | #endif | 1105 | #endif |
1105 | 1106 | ||
@@ -1124,9 +1125,9 @@ static int mtdchar_mmap(struct file *file, struct vm_area_struct *vma) | |||
1124 | #endif | 1125 | #endif |
1125 | return vm_iomap_memory(vma, map->phys, map->size); | 1126 | return vm_iomap_memory(vma, map->phys, map->size); |
1126 | } | 1127 | } |
1127 | return -ENOSYS; | 1128 | return -ENODEV; |
1128 | #else | 1129 | #else |
1129 | return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS; | 1130 | return vma->vm_flags & VM_SHARED ? 0 : -EACCES; |
1130 | #endif | 1131 | #endif |
1131 | } | 1132 | } |
1132 | 1133 | ||