Commit b369a87c authored by Thaissa Falbo's avatar Thaissa Falbo Committed by Greg Kroah-Hartman

staging:media:davinci_vpfe: Fixed comparisons with constants warnings

WARNING: Comparisons should place the constant on the right side of the
test

Fixed warnings by moving the constants to the right side of the comparisons.
Signed-off-by: default avatarThaissa Falbo <thaissa.falbo@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9c5d8933
...@@ -461,7 +461,7 @@ void vpfe_video_schedule_next_buffer(struct vpfe_video_device *video) ...@@ -461,7 +461,7 @@ void vpfe_video_schedule_next_buffer(struct vpfe_video_device *video)
video->next_frm = list_entry(video->dma_queue.next, video->next_frm = list_entry(video->dma_queue.next,
struct vpfe_cap_buffer, list); struct vpfe_cap_buffer, list);
if (VPFE_PIPELINE_STREAM_SINGLESHOT == video->pipe.state) if (video->pipe.state == VPFE_PIPELINE_STREAM_SINGLESHOT)
video->cur_frm = video->next_frm; video->cur_frm = video->next_frm;
list_del(&video->next_frm->list); list_del(&video->next_frm->list);
...@@ -1332,8 +1332,8 @@ static int vpfe_reqbufs(struct file *file, void *priv, ...@@ -1332,8 +1332,8 @@ static int vpfe_reqbufs(struct file *file, void *priv,
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_reqbufs\n"); v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_reqbufs\n");
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != req_buf->type && if (req_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
V4L2_BUF_TYPE_VIDEO_OUTPUT != req_buf->type) { req_buf->type != V4L2_BUF_TYPE_VIDEO_OUTPUT){
v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buffer type\n"); v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buffer type\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1394,8 +1394,8 @@ static int vpfe_querybuf(struct file *file, void *priv, ...@@ -1394,8 +1394,8 @@ static int vpfe_querybuf(struct file *file, void *priv,
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_querybuf\n"); v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_querybuf\n");
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != buf->type && if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
V4L2_BUF_TYPE_VIDEO_OUTPUT != buf->type) { buf->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n"); v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1421,8 +1421,8 @@ static int vpfe_qbuf(struct file *file, void *priv, ...@@ -1421,8 +1421,8 @@ static int vpfe_qbuf(struct file *file, void *priv,
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_qbuf\n"); v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_qbuf\n");
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != p->type && if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
V4L2_BUF_TYPE_VIDEO_OUTPUT != p->type) { p->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n"); v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1449,8 +1449,8 @@ static int vpfe_dqbuf(struct file *file, void *priv, ...@@ -1449,8 +1449,8 @@ static int vpfe_dqbuf(struct file *file, void *priv,
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_dqbuf\n"); v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_dqbuf\n");
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != buf->type && if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
V4L2_BUF_TYPE_VIDEO_OUTPUT != buf->type) { buf->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n"); v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1482,8 +1482,8 @@ static int vpfe_streamon(struct file *file, void *priv, ...@@ -1482,8 +1482,8 @@ static int vpfe_streamon(struct file *file, void *priv,
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_streamon\n"); v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_streamon\n");
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != buf_type && if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
V4L2_BUF_TYPE_VIDEO_OUTPUT != buf_type) { buf_type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n"); v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf type\n");
return ret; return ret;
} }
...@@ -1499,7 +1499,7 @@ static int vpfe_streamon(struct file *file, void *priv, ...@@ -1499,7 +1499,7 @@ static int vpfe_streamon(struct file *file, void *priv,
return -EIO; return -EIO;
} }
/* Validate the pipeline */ /* Validate the pipeline */
if (V4L2_BUF_TYPE_VIDEO_CAPTURE == buf_type) { if (buf_type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
ret = vpfe_video_validate_pipeline(pipe); ret = vpfe_video_validate_pipeline(pipe);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment