media: media/v4l2-core/videobuf-vmalloc.c: Remove dead code
authorSouptick Joarder <jrdr.linux@gmail.com>
Wed, 16 Jan 2019 18:49:33 +0000 (16:49 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 21 Jan 2019 17:46:22 +0000 (15:46 -0200)
This code is commented since version 3.7. If there is no plan to
use it in future, we can remove this dead code.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/videobuf-vmalloc.c

index 45fe781..293213a 100644 (file)
@@ -196,26 +196,6 @@ static int __videobuf_iolock(struct videobuf_queue *q,
                }
                dprintk(1, "vmalloc is at addr %p (%d pages)\n",
                        mem->vaddr, pages);
-
-#if 0
-               int rc;
-               /* Kernel userptr is used also by read() method. In this case,
-                  there's no need to remap, since data will be copied to user
-                */
-               if (!vb->baddr)
-                       return 0;
-
-               /* FIXME: to properly support USERPTR, remap should occur.
-                  The code below won't work, since mem->vma = NULL
-                */
-               /* Try to remap memory */
-               rc = remap_vmalloc_range(mem->vma, (void *)vb->baddr, 0);
-               if (rc < 0) {
-                       printk(KERN_ERR "mmap: remap failed with error %d", rc);
-                       return -ENOMEM;
-               }
-#endif
-
                break;
        case V4L2_MEMORY_OVERLAY:
        default: