diff options
Diffstat (limited to 'drivers/media/i2c/thp7312.c')
-rw-r--r-- | drivers/media/i2c/thp7312.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c index d4975b180704..ad4f2b794e1a 100644 --- a/drivers/media/i2c/thp7312.c +++ b/drivers/media/i2c/thp7312.c @@ -740,6 +740,13 @@ static int thp7312_get_frame_interval(struct v4l2_subdev *sd, { struct thp7312_device *thp7312 = to_thp7312_dev(sd); + /* + * FIXME: Implement support for V4L2_SUBDEV_FORMAT_TRY, using the V4L2 + * subdev active state API. + */ + if (fi->which != V4L2_SUBDEV_FORMAT_ACTIVE) + return -EINVAL; + fi->interval.numerator = 1; fi->interval.denominator = thp7312->current_rate->fps; @@ -757,6 +764,13 @@ static int thp7312_set_frame_interval(struct v4l2_subdev *sd, unsigned int best_delta = UINT_MAX; unsigned int fps; + /* + * FIXME: Implement support for V4L2_SUBDEV_FORMAT_TRY, using the V4L2 + * subdev active state API. + */ + if (fi->which != V4L2_SUBDEV_FORMAT_ACTIVE) + return -EINVAL; + /* Avoid divisions by 0, pick the highest frame if the interval is 0. */ fps = fi->interval.numerator ? DIV_ROUND_CLOSEST(fi->interval.denominator, fi->interval.numerator) |