From: Laurent Pinchart Date: Sat, 23 Jan 2010 10:07:53 +0000 (-0300) Subject: V4L/DVB: uvcvideo: Clamp control values to the minimum and maximum values X-Git-Tag: v2.6.34-rc1~280^2~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e54532e591cd5b9ce77dbc8d9786ae9f600f101a;p=pandora-kernel.git V4L/DVB: uvcvideo: Clamp control values to the minimum and maximum values When setting a control, the V4L2 specification requires drivers to either clamp the control value to the [minimum, maximum] range or return the -ERANGE error. Fix the driver to clamp control values to the valid range in uvc_ctrl_set() and make sure the value differs from the minimum by an integer multiple of step. Signed-off-by: Laurent Pinchart Tested-by: Márton Németh Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed