summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-05-17 18:24:04 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-17 18:24:04 +0200
commitac1d426e825ab5778995f2f6f053ca2e6b45c622 (patch)
tree75b91356ca39463e0112931aa6790802fb1e07a2 /drivers/media/common/saa7146_video.c
parentMerge branch 'devel-pmu' into devel (diff)
parentMerge branch 'for-rmk/2635' of git://git.fluff.org/bjdooks/linux into devel-s... (diff)
downloadlinux-ac1d426e825ab5778995f2f6f053ca2e6b45c622.tar.xz
linux-ac1d426e825ab5778995f2f6f053ca2e6b45c622.zip
Merge branch 'devel-stable' into devel
Conflicts: arch/arm/Kconfig arch/arm/include/asm/system.h arch/arm/mm/Kconfig
Diffstat (limited to 'drivers/media/common/saa7146_video.c')
-rw-r--r--drivers/media/common/saa7146_video.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 5ed75263340a..b8b2c551a1e2 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -558,9 +558,11 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f
/* ok, accept it */
vv->ov_fb = *fb;
vv->ov_fmt = fmt;
- if (0 == vv->ov_fb.fmt.bytesperline)
- vv->ov_fb.fmt.bytesperline =
- vv->ov_fb.fmt.width * fmt->depth / 8;
+
+ if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) {
+ vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8;
+ DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline));
+ }
mutex_unlock(&dev->lock);
return 0;