summaryrefslogtreecommitdiff
path: root/drivers/media/platform/soc_camera/soc_scale_crop.c
diff options
context:
space:
mode:
authorRicardo Ribalda <ricardo.ribalda@gmail.com>2013-11-26 08:31:42 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 10:02:39 (GMT)
commitf90580ca0133c533763a6cb3e632a21098a382df (patch)
tree05e66bbea641292153c2a78d781d49d866a16379 /drivers/media/platform/soc_camera/soc_scale_crop.c
parentda4a733946aa360e2219ce2d33b8d25ce4aa1959 (diff)
downloadlinux-f90580ca0133c533763a6cb3e632a21098a382df.tar.xz
[media] videodev2: Set vb2_rect's width and height as unsigned
As discussed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields from __s32 to __u32. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> (documentation and smiapp) Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/soc_camera/soc_scale_crop.c')
-rw-r--r--drivers/media/platform/soc_camera/soc_scale_crop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c
index cbd3a34..8e74fb7 100644
--- a/drivers/media/platform/soc_camera/soc_scale_crop.c
+++ b/drivers/media/platform/soc_camera/soc_scale_crop.c
@@ -141,8 +141,8 @@ int soc_camera_client_s_crop(struct v4l2_subdev *sd,
* Popular special case - some cameras can only handle fixed sizes like
* QVGA, VGA,... Take care to avoid infinite loop.
*/
- width = max(cam_rect->width, 2);
- height = max(cam_rect->height, 2);
+ width = max_t(unsigned int, cam_rect->width, 2);
+ height = max_t(unsigned int, cam_rect->height, 2);
/*
* Loop as long as sensor is not covering the requested rectangle and