mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
media: atomisp: Use accessors for pad config 'try_*' fields
The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
f4b7c07dc1
commit
9295e7e0cc
|
|
@ -561,7 +561,7 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd,
|
|||
|
||||
fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
|
||||
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
|
||||
sd_state->pads->try_fmt = *fmt;
|
||||
*v4l2_subdev_get_pad_format(sd, sd_state, 0) = *fmt;
|
||||
mutex_unlock(&dev->input_lock);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -666,7 +666,7 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
|
|||
fmt->height = res->height;
|
||||
|
||||
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
|
||||
sd_state->pads->try_fmt = *fmt;
|
||||
*v4l2_subdev_get_pad_format(sd, sd_state, 0) = *fmt;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,
|
|||
|
||||
fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
|
||||
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
|
||||
sd_state->pads->try_fmt = *fmt;
|
||||
*v4l2_subdev_get_pad_format(sd, sd_state, 0) = *fmt;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ static int tpg_set_fmt(struct v4l2_subdev *sd,
|
|||
/* only raw8 grbg is supported by TPG */
|
||||
fmt->code = MEDIA_BUS_FMT_SGRBG8_1X8;
|
||||
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
|
||||
sd_state->pads->try_fmt = *fmt;
|
||||
*v4l2_subdev_get_pad_format(sd, sd_state, 0) = *fmt;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user