From: Laurent Pinchart Date: Wed, 4 Nov 2009 16:11:10 +0000 (-0300) Subject: V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch... X-Git-Tag: MMI-PSA29.97-13-9~25942^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e8961330ec4b558a0f4db18ab5fb566842f492b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch with abs() The abs() macro has changed in 2.6.32 and returns a long instead of an int. Fix the driver to avoid compilation warnings. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index c3225a561748..1b89735e62fd 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -348,7 +348,7 @@ static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, __s32 value, __u8 *data) { data[0] = value == 0 ? 0 : (value > 0) ? 1 : 0xff; - data[2] = min(abs(value), 0xff); + data[2] = min((int)abs(value), 0xff); } static struct uvc_control_mapping uvc_ctrl_mappings[] = {