mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
media: mgb4: Enumerate only the available timings
Enumerate only the available (as given by the input source) timings, not all theoretically possible. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
e2ff320006
commit
2226b2dd42
|
|
@ -641,7 +641,14 @@ static int vidioc_query_dv_timings(struct file *file, void *fh,
|
|||
static int vidioc_enum_dv_timings(struct file *file, void *fh,
|
||||
struct v4l2_enum_dv_timings *timings)
|
||||
{
|
||||
return v4l2_enum_dv_timings_cap(timings, &video_timings_cap, NULL, NULL);
|
||||
struct mgb4_vin_dev *vindev = video_drvdata(file);
|
||||
|
||||
if (timings->index != 0)
|
||||
return -EINVAL;
|
||||
if (get_timings(vindev, &timings->timings) < 0)
|
||||
return -ENODATA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vidioc_dv_timings_cap(struct file *file, void *fh,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user