summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivi.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-04-16 09:41:25 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 09:18:09 -0300
commit0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 (patch)
treedd9f045fa482ee601cdf4ee67c649530f22abc5e /drivers/media/platform/vivi.c
parent7d6bc608e062f6b6667c9eeeb17055f017ecadb1 (diff)
downloadop-kernel-dev-0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3.zip
op-kernel-dev-0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3.tar.gz
[media] v4l2-ctrls: increase internal min/max/step/def to 64 bit
While VIDIOC_QUERYCTRL is limited to 32 bit min/max/step/def values for controls, the upcoming VIDIOC_QUERY_EXT_CTRL isn't. So increase the internal representation to 64 bits in preparation. Because of these changes the msi3101 driver has been modified slightly to fix a formatting issue (%d becomes %lld), vivi had to be modified as well to cope with the new 64-bit min/max values and the PIXEL_RATE control in a few sensor drivers required proper min/max/def values. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/vivi.c')
-rw-r--r--drivers/media/platform/vivi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
index b7fbcdf..cd535b3 100644
--- a/drivers/media/platform/vivi.c
+++ b/drivers/media/platform/vivi.c
@@ -1236,7 +1236,7 @@ static const struct v4l2_ctrl_config vivi_ctrl_int32 = {
.id = VIVI_CID_CUSTOM_BASE + 2,
.name = "Integer 32 Bits",
.type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0x80000000,
+ .min = -0x80000000LL,
.max = 0x7fffffff,
.step = 1,
};
@@ -1246,6 +1246,9 @@ static const struct v4l2_ctrl_config vivi_ctrl_int64 = {
.id = VIVI_CID_CUSTOM_BASE + 3,
.name = "Integer 64 Bits",
.type = V4L2_CTRL_TYPE_INTEGER64,
+ .min = LLONG_MIN,
+ .max = LLONG_MAX,
+ .step = 1,
};
static const char * const vivi_ctrl_menu_strings[] = {
OpenPOWER on IntegriCloud