]> git.baikalelectronics.ru Git - kernel.git/commit
[media] Fix 64-bit division fall-out from 64-bit control ranges
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 17 Jul 2014 15:31:23 +0000 (12:31 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 15:44:38 +0000 (12:44 -0300)
commit0c5d125227affd25239782309a5731ef5113623f
tree5a9f6581e1cc493f7dc624e51e7b65598a419005
parentff4d7e214e80cc5a298a7dd918098b883016f6a8
[media] Fix 64-bit division fall-out from 64-bit control ranges

Commit c488c293447cdbefd9da2b4ce1eea38df8ee0a8e increased the internal control ranges
to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value
control values in a division or modulus operations since not all architectures support
those natively.

Luckily, in almost all cases it is possible to just cast to 32 bits (the control value
is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to
use do_div in one function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/soc_camera/mt9m001.c
drivers/media/i2c/soc_camera/mt9t031.c
drivers/media/i2c/soc_camera/mt9v022.c
drivers/media/radio/radio-keene.c
drivers/media/usb/gspca/autogain_functions.c
drivers/media/usb/gspca/pac7302.c
drivers/media/usb/gspca/sonixb.c
drivers/media/v4l2-core/v4l2-ctrls.c