diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2018-02-08 07:00:02 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-21 11:20:56 -0400 |
commit | ac53212880a1af2191fd469dab275b94cd9d13c8 (patch) | |
tree | e18d37ea52ddec29a16cf2ec04574b494ed01261 /drivers/media/platform | |
parent | 894de53b4938f6e4eb5dd0435c60cc87b5747855 (diff) | |
download | linux-stable-ac53212880a1af2191fd469dab275b94cd9d13c8.tar.gz linux-stable-ac53212880a1af2191fd469dab275b94cd9d13c8.tar.bz2 linux-stable-ac53212880a1af2191fd469dab275b94cd9d13c8.zip |
media: vivid: Use v4l2_find_nearest_size
Use v4l2_find_nearest_size instead of a driver specific function to find
nearest matching size.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-cap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c index 808967c7b0ab..01c703683657 100644 --- a/drivers/media/platform/vivid/vivid-vid-cap.c +++ b/drivers/media/platform/vivid/vivid-vid-cap.c @@ -561,9 +561,8 @@ int vivid_try_fmt_vid_cap(struct file *file, void *priv, mp->field = vivid_field_cap(dev, mp->field); if (vivid_is_webcam(dev)) { const struct v4l2_frmsize_discrete *sz = - v4l2_find_nearest_format(webcam_sizes, - VIVID_WEBCAM_SIZES, - mp->width, mp->height); + v4l2_find_nearest_size(webcam_sizes, width, height, + mp->width, mp->height); w = sz->width; h = sz->height; |