aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-03-21 16:29:27 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-04 06:12:53 -0400
commitd2dc57b10ae2bd2e2e92ce26f2aaf24bcee17c53 (patch)
treef59cdab6eda07f590b9d2c54408ac3b387ea32cd /drivers/media/platform/vivid
parentmedia: imx-media-csi: Do not propagate the error when pinctrl is not found (diff)
downloadlinux-dev-d2dc57b10ae2bd2e2e92ce26f2aaf24bcee17c53.tar.xz
linux-dev-d2dc57b10ae2bd2e2e92ce26f2aaf24bcee17c53.zip
media: v4l: Bring back array_size parameter to v4l2_find_nearest_size
An older version of the driver patches were merged accidentally which resulted in missing the array_size parameter that tells the length of the array that contains the different supported sizes. Bring it back to v4l2_find_nearest size and make the corresponding change for the drivers using it as well. 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/vivid')
-rw-r--r--drivers/media/platform/vivid/vivid-vid-cap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 01c703683657..1599159f2574 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -561,8 +561,9 @@ 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_size(webcam_sizes, width, height,
- mp->width, mp->height);
+ v4l2_find_nearest_size(webcam_sizes,
+ VIVID_WEBCAM_SIZES, width,
+ height, mp->width, mp->height);
w = sz->width;
h = sz->height;