summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-22 09:49:27 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 09:14:57 -0500
commit0545629e50af60e7afad9d6023a546aed1081a8e (patch)
tree89d227585f2e724bc09853c4daad2614d38bc825 /drivers/media/platform/vivid
parent01154ef5820a756283686247405a599c4ef7dc48 (diff)
downloadlinux-0545629e50af60e7afad9d6023a546aed1081a8e.tar.gz
linux-0545629e50af60e7afad9d6023a546aed1081a8e.tar.bz2
linux-0545629e50af60e7afad9d6023a546aed1081a8e.zip
media: v4l2-common: get rid of struct v4l2_discrete_probe
This struct is there just two store two arguments of v4l2_find_nearest_format(). The other two arguments are passed as parameter. IMHO, there isn't much sense on doing that, and that will just add one more struct to document ;) So, let's get rid of the struct, passing the parameters directly. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.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.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 01419455e545..0fbbcde19f0d 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -93,11 +93,6 @@ static const struct v4l2_fract webcam_intervals[VIVID_WEBCAM_IVALS] = {
{ 1, 60 },
};
-static const struct v4l2_discrete_probe webcam_probe = {
- webcam_sizes,
- VIVID_WEBCAM_SIZES
-};
-
static int vid_cap_queue_setup(struct vb2_queue *vq,
unsigned *nbuffers, unsigned *nplanes,
unsigned sizes[], struct device *alloc_devs[])
@@ -578,7 +573,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_format(&webcam_probe, mp->width, mp->height);
+ v4l2_find_nearest_format(webcam_sizes,
+ VIVID_WEBCAM_SIZES,
+ mp->width, mp->height);
w = sz->width;
h = sz->height;