summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zr364xx.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-25 08:38:26 +0200
committerGrant Likely <grant.likely@secretlab.ca>2010-05-25 08:38:26 +0200
commitb1e50ebcf24668e57f058deb48b0704b5391ed0f (patch)
tree17e1b69b249d0738317b732186340c9dd053f1a1 /drivers/media/video/zr364xx.c
parentspi/davinci: Fix clock prescale factor computation (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 (diff)
downloadlinux-b1e50ebcf24668e57f058deb48b0704b5391ed0f.tar.xz
linux-b1e50ebcf24668e57f058deb48b0704b5391ed0f.zip
Merge remote branch 'origin' into secretlab/next-spi
Diffstat (limited to 'drivers/media/video/zr364xx.c')
-rw-r--r--drivers/media/video/zr364xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
index 3d4bac252902..a82b5bd18d26 100644
--- a/drivers/media/video/zr364xx.c
+++ b/drivers/media/video/zr364xx.c
@@ -376,8 +376,8 @@ static int buffer_setup(struct videobuf_queue *vq, unsigned int *count,
if (*count == 0)
*count = ZR364XX_DEF_BUFS;
- while (*size * (*count) > ZR364XX_DEF_BUFS * 1024 * 1024)
- (*count)--;
+ if (*size * *count > ZR364XX_DEF_BUFS * 1024 * 1024)
+ *count = (ZR364XX_DEF_BUFS * 1024 * 1024) / *size;
return 0;
}