aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9t031.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mt9t031.c')
-rw-r--r--drivers/media/video/mt9t031.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c
index 125973bf08b9..3fa87be2fc6e 100644
--- a/drivers/media/video/mt9t031.c
+++ b/drivers/media/video/mt9t031.c
@@ -321,11 +321,12 @@ static int mt9t031_set_params(struct soc_camera_device *icd,
321 return ret < 0 ? ret : 0; 321 return ret < 0 ? ret : 0;
322} 322}
323 323
324static int mt9t031_set_crop(struct soc_camera_device *icd, 324static int mt9t031_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
325 struct v4l2_rect *rect)
326{ 325{
327 struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); 326 struct v4l2_rect *rect = &a->c;
327 struct i2c_client *client = sd->priv;
328 struct mt9t031 *mt9t031 = to_mt9t031(client); 328 struct mt9t031 *mt9t031 = to_mt9t031(client);
329 struct soc_camera_device *icd = client->dev.platform_data;
329 330
330 /* Make sure we don't exceed sensor limits */ 331 /* Make sure we don't exceed sensor limits */
331 if (rect->left + rect->width > icd->rect_max.left + icd->rect_max.width) 332 if (rect->left + rect->width > icd->rect_max.left + icd->rect_max.width)
@@ -495,7 +496,6 @@ static const struct v4l2_queryctrl mt9t031_controls[] = {
495static struct soc_camera_ops mt9t031_ops = { 496static struct soc_camera_ops mt9t031_ops = {
496 .init = mt9t031_init, 497 .init = mt9t031_init,
497 .release = mt9t031_release, 498 .release = mt9t031_release,
498 .set_crop = mt9t031_set_crop,
499 .set_bus_param = mt9t031_set_bus_param, 499 .set_bus_param = mt9t031_set_bus_param,
500 .query_bus_param = mt9t031_query_bus_param, 500 .query_bus_param = mt9t031_query_bus_param,
501 .controls = mt9t031_controls, 501 .controls = mt9t031_controls,
@@ -689,6 +689,7 @@ static struct v4l2_subdev_video_ops mt9t031_subdev_video_ops = {
689 .s_stream = mt9t031_s_stream, 689 .s_stream = mt9t031_s_stream,
690 .s_fmt = mt9t031_s_fmt, 690 .s_fmt = mt9t031_s_fmt,
691 .try_fmt = mt9t031_try_fmt, 691 .try_fmt = mt9t031_try_fmt,
692 .s_crop = mt9t031_s_crop,
692}; 693};
693 694
694static struct v4l2_subdev_ops mt9t031_subdev_ops = { 695static struct v4l2_subdev_ops mt9t031_subdev_ops = {