Skip to content

Commit

Permalink
V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to…
Browse files Browse the repository at this point in the history
… 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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Nov 7, 2009
1 parent a2e35af commit 2e89613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/uvc/uvc_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 2e89613

Please sign in to comment.