msm: mpq8064: Change in how vcap req_buf calcs num buf

A design change in how req_buf is suppose to work. Before req_buf
would set the number of buffers needed to the minimum required by
VCAP plus one buffer for cycling. The design now is now designed
that req_buf now adds the minimum number of buffers requred by the
VCAP to the value passed in.

Change-Id: If3ac47fee076aefc9095804abfb38cf26c4a806f
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
diff --git a/drivers/media/video/vcap_v4l2.c b/drivers/media/video/vcap_v4l2.c
index 6443250..670d0f8 100644
--- a/drivers/media/video/vcap_v4l2.c
+++ b/drivers/media/video/vcap_v4l2.c
@@ -154,7 +154,10 @@
 				unsigned int *nplanes, unsigned long sizes[],
 				void *alloc_ctxs[])
 {
-	*nbuffers = 3;
+	*nbuffers += 2;
+	if (*nbuffers > VIDEO_MAX_FRAME)
+		return -EINVAL;
+
 	*nplanes = 1;
 	return 0;
 }