提交 f956035c 编写于 作者: R Ricardo Ribalda 提交者: Mauro Carvalho Chehab

[media] vb2: Return 0 when streamon and streamoff are already on/off

According to the doc:
If VIDIOC_STREAMON is called when streaming is already in progress,
or if VIDIOC_STREAMOFF is called when streaming is already stopped,
then the ioctl does nothing and 0 is returned.
The current implementation was returning -EINVAL instead.
Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 202dfbdc
......@@ -1697,8 +1697,8 @@ int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
}
if (q->streaming) {
dprintk(1, "streamon: already streaming\n");
return -EBUSY;
dprintk(3, "streamon successful: already streaming\n");
return 0;
}
/*
......@@ -1754,8 +1754,8 @@ int vb2_streamoff(struct vb2_queue *q, enum v4l2_buf_type type)
}
if (!q->streaming) {
dprintk(1, "streamoff: not streaming\n");
return -EINVAL;
dprintk(3, "streamoff successful: not streaming\n");
return 0;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册