On 06/04/2022 15:36, Hans Verkuil wrote: > > > On 24/03/2022 09:00, Tomi Valkeinen wrote: >> The subdev state is now used for both try and active cases. We should >> rename v4l2_subdev_get_try_* helpers to v4l2_subdev_get_pad_*, but due >> to the size of that change lets add temporary wrapper helpers which can >> be used in drivers that support active state. >> >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx> > > Reviewed-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> > >> --- >> include/media/v4l2-subdev.h | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h >> index 1bbe4383966c..b9587a265b32 100644 >> --- a/include/media/v4l2-subdev.h >> +++ b/include/media/v4l2-subdev.h >> @@ -1042,6 +1042,16 @@ v4l2_subdev_get_try_compose(struct v4l2_subdev *sd, >> return &state->pads[pad].try_compose; >> } >> >> +/* Temprary helpers until v4l2_subdev_get_try_* functions have been renamed */ >> +#define v4l2_subdev_get_pad_format(sd, state, pad) \ >> + v4l2_subdev_get_try_format(sd, state, pad) >> + >> +#define v4l2_subdev_get_pad_crop(sd, state, pad) \ >> + v4l2_subdev_get_try_crop(sd, state, pad) >> + >> +#define v4l2_subdev_get_pad_compose(sd, state, pad) \ >> + v4l2_subdev_get_try_compose(sd, state, pad) Actually, wouldn't it be better to rename the try helpers and add #defines for the old names? I think I prefer that. Regards, Hans >> + >> #endif >> >> extern const struct v4l2_file_operations v4l2_subdev_fops;