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 <[email protected]>
Acked-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Mauro Carvalho Chehab 2017-09-22 09:49:27 -04:00
commit 0545629e50
3 changed files with 14 additions and 20 deletions

View file

@ -249,14 +249,10 @@ void v4l_bound_align_image(unsigned int *w, unsigned int wmin,
unsigned int hmax, unsigned int halign,
unsigned int salign);
struct v4l2_discrete_probe {
const struct v4l2_frmsize_discrete *sizes;
int num_sizes;
};
const struct v4l2_frmsize_discrete *v4l2_find_nearest_format(
const struct v4l2_discrete_probe *probe,
s32 width, s32 height);
const struct v4l2_frmsize_discrete *
v4l2_find_nearest_format(const struct v4l2_frmsize_discrete *sizes,
const size_t num_sizes,
s32 width, s32 height);
void v4l2_get_timestamp(struct timeval *tv);