diff --git a/fthd_v4l2.c b/fthd_v4l2.c index 1d62a9e..ea3fe16 100644 --- a/fthd_v4l2.c +++ b/fthd_v4l2.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -41,7 +42,9 @@ #define FTHD_NUM_FORMATS 2 /* NV16 is disabled for now */ static int fthd_buffer_queue_setup(struct vb2_queue *vq, +#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,4,0) const struct v4l2_format *fmt, +#endif unsigned int *nbuffers, unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) { @@ -55,10 +58,6 @@ static int fthd_buffer_queue_setup(struct vb2_queue *vq, return -EINVAL; /* FIXME: We assume single plane format here but not below */ - if (fmt && fmt->fmt.pix.sizeimage < - (cur_fmt->bytesperline * cur_fmt->height)) - return -EINVAL; - for (i = 0; i < *nplanes; i++) { sizes[i] = cur_fmt->sizeimage; alloc_ctxs[i] = dev_priv->alloc_ctx;