]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/mtdchar.c
usbnet: mcs7830: apply introduced usb command APIs
[~andy/linux] / drivers / mtd / mtdchar.c
index 73ae81a629f274b0a81af26e0f32cd328a95a55a..82c06165d3d27351f3cebf9966b513b6669e96bf 100644 (file)
@@ -1162,7 +1162,11 @@ static int mtdchar_mmap(struct file *file, struct vm_area_struct *vma)
        resource_size_t start, off;
        unsigned long len, vma_len;
 
-       if (mtd->type == MTD_RAM || mtd->type == MTD_ROM) {
+        /* This is broken because it assumes the MTD device is map-based
+          and that mtd->priv is a valid struct map_info.  It should be
+          replaced with something that uses the mtd_get_unmapped_area()
+          operation properly. */
+       if (0 /*mtd->type == MTD_RAM || mtd->type == MTD_ROM*/) {
                off = get_vm_offset(vma);
                start = map->phys;
                len = PAGE_ALIGN((start & ~PAGE_MASK) + map->size);