]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch...
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 4 Nov 2009 16:11:10 +0000 (13:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 7 Nov 2009 14:55:14 +0000 (12:55 -0200)
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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_ctrl.c

index c3225a561748bec3794af79d354cf2ede22a852b..1b89735e62fdb5d2bdd94c1dd301b755963afc8a 100644 (file)
@@ -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[] = {