]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
V4L/DVB (12743): em28xx: fix mmap_mapper with vbi
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Thu, 3 Sep 2009 01:23:23 +0000 (22:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 02:47:42 +0000 (23:47 -0300)
When adding support for both video and VBI, I missed the mmap ioctl.  Add
the missing call.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-video.c

index 7022f7ba61bbb6fa2dbd4e5ffe85dd26c4c2237c..55bc8ea56094db10ce8bed52a4dc2e87b1aff88a 100644 (file)
@@ -2303,7 +2303,10 @@ static int em28xx_v4l2_mmap(struct file *filp, struct vm_area_struct *vma)
        if (unlikely(rc < 0))
                return rc;
 
-       rc = videobuf_mmap_mapper(&fh->vb_vidq, vma);
+       if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
+               rc = videobuf_mmap_mapper(&fh->vb_vidq, vma);
+       else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE)
+               rc = videobuf_mmap_mapper(&fh->vb_vbiq, vma);
 
        em28xx_videodbg("vma start=0x%08lx, size=%ld, ret=%d\n",
                (unsigned long)vma->vm_start,