]> www.infradead.org Git - users/willy/xarray.git/commit
media: vim2m: Simplify try_fmt
authorMatthew Majewski <mattwmajewski@gmail.com>
Tue, 4 Mar 2025 19:17:00 +0000 (14:17 -0500)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 25 Apr 2025 13:14:25 +0000 (15:14 +0200)
commitbbd0df9bfe1c085bf9b0a315dd5fb58e491dfa5b
tree9dc5743e4abcbb190999c71809369a0a7e7d60a5
parentdf8375bbe2d5bb6d7f86701b15426674f2529a18
media: vim2m: Simplify try_fmt

Clean up vidioc_try_fmt with the following changes:

1. remove unsused vim2m_fmt parameter
2. use clamp() macro to restrain width/height bounds
3. use ALIGN() macro to align width/height
4. use v4l2_fill_pixfmt to set bytesperline/sizeimage

Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/test-drivers/vim2m.c