Re: [PATCH v6 3/8] media: subdev: add v4l2_subdev_get_pad_* helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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;



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux