From e6641c80b042461fb8d4a231a95fafdba167c28d Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Fri, 11 Dec 2009 11:53:56 -0300 Subject: [PATCH] V4L/DVB (13671): sh_mobile_ceu_camera: Remove frame size page alignment This patch updates the SuperH Mobile CEU driver to not page align the frame size. Useful in the case of USERPTR with non-page aligned frame sizes and offsets. Signed-off-by: Magnus Damm Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/sh_mobile_ceu_camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index a610a571432..d69363f0d8c 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -206,13 +206,13 @@ static int sh_mobile_ceu_videobuf_setup(struct videobuf_queue *vq, if (bytes_per_line < 0) return bytes_per_line; - *size = PAGE_ALIGN(bytes_per_line * icd->user_height); + *size = bytes_per_line * icd->user_height; if (0 == *count) *count = 2; if (pcdev->video_limit) { - while (*size * *count > pcdev->video_limit) + while (PAGE_ALIGN(*size) * *count > pcdev->video_limit) (*count)--; }