From 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 16 Apr 2014 09:41:25 -0300 Subject: [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 Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/mt9v032.c | 2 +- drivers/media/i2c/smiapp/smiapp-core.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/i2c') diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c index 40172b8d8ea2..65e6e1a9d104 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -931,7 +931,7 @@ static int mt9v032_probe(struct i2c_client *client, mt9v032->pixel_rate = v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops, - V4L2_CID_PIXEL_RATE, 0, 0, 1, 0); + V4L2_CID_PIXEL_RATE, 1, INT_MAX, 1, 1); if (pdata && pdata->link_freqs) { unsigned int def = 0; diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 446c82c58a62..72350f0befc5 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -533,7 +533,7 @@ static int smiapp_init_controls(struct smiapp_sensor *sensor) sensor->pixel_rate_parray = v4l2_ctrl_new_std( &sensor->pixel_array->ctrl_handler, &smiapp_ctrl_ops, - V4L2_CID_PIXEL_RATE, 0, 0, 1, 0); + V4L2_CID_PIXEL_RATE, 1, INT_MAX, 1, 1); if (sensor->pixel_array->ctrl_handler.error) { dev_err(&client->dev, @@ -562,7 +562,7 @@ static int smiapp_init_controls(struct smiapp_sensor *sensor) sensor->pixel_rate_csi = v4l2_ctrl_new_std( &sensor->src->ctrl_handler, &smiapp_ctrl_ops, - V4L2_CID_PIXEL_RATE, 0, 0, 1, 0); + V4L2_CID_PIXEL_RATE, 1, INT_MAX, 1, 1); if (sensor->src->ctrl_handler.error) { dev_err(&client->dev, -- cgit v1.2.1