aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mx1_camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mx1_camera.c')
-rw-r--r--drivers/media/video/mx1_camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
index 34a66019190e..5c17f9ec3d7c 100644
--- a/drivers/media/video/mx1_camera.c
+++ b/drivers/media/video/mx1_camera.c
@@ -139,8 +139,8 @@ static int mx1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
139 if (!*count) 139 if (!*count)
140 *count = 32; 140 *count = 32;
141 141
142 while (*size * *count > MAX_VIDEO_MEM * 1024 * 1024) 142 if (*size * *count > MAX_VIDEO_MEM * 1024 * 1024)
143 (*count)--; 143 *count = (MAX_VIDEO_MEM * 1024 * 1024) / *size;
144 144
145 dev_dbg(icd->dev.parent, "count=%d, size=%d\n", *count, *size); 145 dev_dbg(icd->dev.parent, "count=%d, size=%d\n", *count, *size);
146 146