aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorSam Revitch <sam.revitch@gmail.com>2007-05-01 07:46:30 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-05-09 09:12:29 -0400
commit1088b1373506fd75d2ac80433b847f116b917bc9 (patch)
tree0fbd70b39dcd0c829662ac6df0001d5364ef20e6 /drivers/media/video
parent9df2ead585515f32d6c9092780c3d13a9627a4a9 (diff)
V4L/DVB (5568): VIDIOCGMBUF handling in video_ioctl2()
Correct handling of VIDIOCGMBUF in video_ioctl2(). Signed-off-by: Sam Revitch <samr7@cs.washington.edu> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/videodev.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 5263b50463e1..f45c625a92f4 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -437,6 +437,24 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
437 v4l_print_ioctl(vfd->name, cmd); 437 v4l_print_ioctl(vfd->name, cmd);
438 } 438 }
439 439
440#ifdef CONFIG_VIDEO_V4L1_COMPAT
441 /* --- streaming capture ------------------------------------- */
442 if (cmd == VIDIOCGMBUF) {
443 struct video_mbuf *p=arg;
444
445 memset(p,0,sizeof(p));
446
447 if (!vfd->vidiocgmbuf)
448 return ret;
449 ret=vfd->vidiocgmbuf(file, fh, p);
450 if (!ret)
451 dbgarg (cmd, "size=%d, frames=%d, offsets=0x%08lx\n",
452 p->size, p->frames,
453 (unsigned long)p->offsets);
454 return ret;
455 }
456#endif
457
440 if (_IOC_TYPE(cmd)=='v') 458 if (_IOC_TYPE(cmd)=='v')
441 return v4l_compat_translate_ioctl(inode,file,cmd,arg, 459 return v4l_compat_translate_ioctl(inode,file,cmd,arg,
442 __video_do_ioctl); 460 __video_do_ioctl);
@@ -791,24 +809,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
791 ret=vfd->vidioc_overlay(file, fh, *i); 809 ret=vfd->vidioc_overlay(file, fh, *i);
792 break; 810 break;
793 } 811 }
794#ifdef CONFIG_VIDEO_V4L1_COMPAT
795 /* --- streaming capture ------------------------------------- */
796 case VIDIOCGMBUF:
797 {
798 struct video_mbuf *p=arg;
799
800 memset(p,0,sizeof(p));
801
802 if (!vfd->vidiocgmbuf)
803 break;
804 ret=vfd->vidiocgmbuf(file, fh, p);
805 if (!ret)
806 dbgarg (cmd, "size=%d, frames=%d, offsets=0x%08lx\n",
807 p->size, p->frames,
808 (unsigned long)p->offsets);
809 break;
810 }
811#endif
812 case VIDIOC_G_FBUF: 812 case VIDIOC_G_FBUF:
813 { 813 {
814 struct v4l2_framebuffer *p=arg; 814 struct v4l2_framebuffer *p=arg;