|
@@ -580,6 +580,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
|
|
|
static void stop_streaming(struct vb2_queue *vq)
|
|
static void stop_streaming(struct vb2_queue *vq)
|
|
|
{
|
|
{
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
+ unsigned long timeout;
|
|
|
struct bm2835_mmal_dev *dev = vb2_get_drv_priv(vq);
|
|
struct bm2835_mmal_dev *dev = vb2_get_drv_priv(vq);
|
|
|
|
|
|
|
|
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, "%s: dev:%p\n",
|
|
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, "%s: dev:%p\n",
|
|
@@ -605,10 +606,10 @@ static void stop_streaming(struct vb2_queue *vq)
|
|
|
sizeof(dev->capture.frame_count));
|
|
sizeof(dev->capture.frame_count));
|
|
|
|
|
|
|
|
/* wait for last frame to complete */
|
|
/* wait for last frame to complete */
|
|
|
- ret = wait_for_completion_timeout(&dev->capture.frame_cmplt, HZ);
|
|
|
|
|
- if (ret <= 0)
|
|
|
|
|
|
|
+ timeout = wait_for_completion_timeout(&dev->capture.frame_cmplt, HZ);
|
|
|
|
|
+ if (timeout == 0)
|
|
|
v4l2_err(&dev->v4l2_dev,
|
|
v4l2_err(&dev->v4l2_dev,
|
|
|
- "error %d waiting for frame completion\n", ret);
|
|
|
|
|
|
|
+ "timed out waiting for frame completion\n");
|
|
|
|
|
|
|
|
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
|
|
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
|
|
|
"disabling connection\n");
|
|
"disabling connection\n");
|