diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 12:39:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 12:39:15 -0400 |
commit | 5ffd1a6aaacc25be8cd0770a51ec6d46add3a276 (patch) | |
tree | 5b076c44f8b7ff88dba9a554d7748c6f083c9071 /drivers/media/video/v4l1-compat.c | |
parent | 0cd43f83d381c4246a08cd775834833d6fd64805 (diff) | |
parent | 8dd86eebc5315910ebfd9f30f1674254308be4b3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (180 commits)
V4L/DVB (4641): Trivial: use lowercase letters in hex subsystem ids
V4L/DVB (4639): Cx88: add autodetection for alternate revision of Leadtek PVR
V4L/DVB (4638): Basic DVB-T and analog TV support for the HVR1300.
V4L/DVB (4637): Add a default method for VIDIOC_G_PARM
V4L/DVB (4635): Extend bttv and saa7134 to check for both AGP and PCI PCI failure case
V4L/DVB (4634): Zr36120: implement pcipci checks
V4L/DVB (4632): Zoran: Implement pcipci failure check
V4L/DVB (4631): Av7110: remove V4L2_CAP_VBI_CAPTURE flag
V4L/DVB (4630): Av7110: FW_LOADER depemdency fixed
V4L/DVB (4629): Saa7134: add card support for Proteus Pro 2309
V4L/DVB (4628): Fix VIDIOC_ENUMSTD ioctl in videodev.c
V4L/DVB (4627): Vivi crashes with mplayer
V4L/DVB (4626): On saa7111/7113, LUMA_CTRL need a different value
V4L/DVB (4624): Tvaudio: Replaced kernel_thread() with kthread_run()
V4L/DVB (4622): Copy-paste bug in videodev.c
V4L/DVB (4620): Fix AGC configuration for MOD3000P-based boards
V4L/DVB (4619): Fixes some I2C dependencies on V4L devices
V4L/DVB (4617): Problem with dibusb-mb.c USB IDs
V4L/DVB (4616): [PATCH] Nebula DigiTV USB RC support
V4L/DVB (4614): Export symbol saa7134_tvaudio_setmute from saa7134 for saa7134-alsa
...
Diffstat (limited to 'drivers/media/video/v4l1-compat.c')
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index d7c3fcbc80f7..1d899e2db394 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -349,6 +349,8 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
349 | { | 349 | { |
350 | struct video_buffer *buffer = arg; | 350 | struct video_buffer *buffer = arg; |
351 | 351 | ||
352 | memset(buffer, 0, sizeof(*buffer)); | ||
353 | |||
352 | err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2); | 354 | err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2); |
353 | if (err < 0) { | 355 | if (err < 0) { |
354 | dprintk("VIDIOCGFBUF / VIDIOC_G_FBUF: %d\n",err); | 356 | dprintk("VIDIOCGFBUF / VIDIOC_G_FBUF: %d\n",err); |
@@ -361,7 +363,7 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
361 | switch (fbuf2.fmt.pixelformat) { | 363 | switch (fbuf2.fmt.pixelformat) { |
362 | case V4L2_PIX_FMT_RGB332: | 364 | case V4L2_PIX_FMT_RGB332: |
363 | buffer->depth = 8; | 365 | buffer->depth = 8; |
364 | break; | 366 | break; |
365 | case V4L2_PIX_FMT_RGB555: | 367 | case V4L2_PIX_FMT_RGB555: |
366 | buffer->depth = 15; | 368 | buffer->depth = 15; |
367 | break; | 369 | break; |
@@ -377,9 +379,13 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
377 | default: | 379 | default: |
378 | buffer->depth = 0; | 380 | buffer->depth = 0; |
379 | } | 381 | } |
380 | if (0 != fbuf2.fmt.bytesperline) | 382 | if (fbuf2.fmt.bytesperline) { |
381 | buffer->bytesperline = fbuf2.fmt.bytesperline; | 383 | buffer->bytesperline = fbuf2.fmt.bytesperline; |
382 | else { | 384 | if (!buffer->depth && buffer->width) |
385 | buffer->depth = ((fbuf2.fmt.bytesperline<<3) | ||
386 | + (buffer->width-1) ) | ||
387 | /buffer->width; | ||
388 | } else { | ||
383 | buffer->bytesperline = | 389 | buffer->bytesperline = |
384 | (buffer->width * buffer->depth + 7) & 7; | 390 | (buffer->width * buffer->depth + 7) & 7; |
385 | buffer->bytesperline >>= 3; | 391 | buffer->bytesperline >>= 3; |