|
@@ -1735,19 +1735,13 @@ int uvc_video_resume(struct uvc_streaming *stream, int reset)
|
|
uvc_video_clock_reset(stream);
|
|
uvc_video_clock_reset(stream);
|
|
|
|
|
|
ret = uvc_commit_video(stream, &stream->ctrl);
|
|
ret = uvc_commit_video(stream, &stream->ctrl);
|
|
- if (ret < 0) {
|
|
|
|
- uvc_queue_enable(&stream->queue, 0);
|
|
|
|
|
|
+ if (ret < 0)
|
|
return ret;
|
|
return ret;
|
|
- }
|
|
|
|
|
|
|
|
if (!uvc_queue_streaming(&stream->queue))
|
|
if (!uvc_queue_streaming(&stream->queue))
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
- ret = uvc_init_video(stream, GFP_NOIO);
|
|
|
|
- if (ret < 0)
|
|
|
|
- uvc_queue_enable(&stream->queue, 0);
|
|
|
|
-
|
|
|
|
- return ret;
|
|
|
|
|
|
+ return uvc_init_video(stream, GFP_NOIO);
|
|
}
|
|
}
|
|
|
|
|
|
/* ------------------------------------------------------------------------
|
|
/* ------------------------------------------------------------------------
|
|
@@ -1779,11 +1773,6 @@ int uvc_video_init(struct uvc_streaming *stream)
|
|
|
|
|
|
atomic_set(&stream->active, 0);
|
|
atomic_set(&stream->active, 0);
|
|
|
|
|
|
- /* Initialize the video buffers queue. */
|
|
|
|
- ret = uvc_queue_init(&stream->queue, stream->type, !uvc_no_drop_param);
|
|
|
|
- if (ret)
|
|
|
|
- return ret;
|
|
|
|
-
|
|
|
|
/* Alternate setting 0 should be the default, yet the XBox Live Vision
|
|
/* Alternate setting 0 should be the default, yet the XBox Live Vision
|
|
* Cam (and possibly other devices) crash or otherwise misbehave if
|
|
* Cam (and possibly other devices) crash or otherwise misbehave if
|
|
* they don't receive a SET_INTERFACE request before any other video
|
|
* they don't receive a SET_INTERFACE request before any other video
|
|
@@ -1890,7 +1879,6 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable)
|
|
usb_clear_halt(stream->dev->udev, pipe);
|
|
usb_clear_halt(stream->dev->udev, pipe);
|
|
}
|
|
}
|
|
|
|
|
|
- uvc_queue_enable(&stream->queue, 0);
|
|
|
|
uvc_video_clock_cleanup(stream);
|
|
uvc_video_clock_cleanup(stream);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -1899,10 +1887,6 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable)
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- ret = uvc_queue_enable(&stream->queue, 1);
|
|
|
|
- if (ret < 0)
|
|
|
|
- goto error_queue;
|
|
|
|
-
|
|
|
|
/* Commit the streaming parameters. */
|
|
/* Commit the streaming parameters. */
|
|
ret = uvc_commit_video(stream, &stream->ctrl);
|
|
ret = uvc_commit_video(stream, &stream->ctrl);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
@@ -1917,8 +1901,6 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable)
|
|
error_video:
|
|
error_video:
|
|
usb_set_interface(stream->dev->udev, stream->intfnum, 0);
|
|
usb_set_interface(stream->dev->udev, stream->intfnum, 0);
|
|
error_commit:
|
|
error_commit:
|
|
- uvc_queue_enable(&stream->queue, 0);
|
|
|
|
-error_queue:
|
|
|
|
uvc_video_clock_cleanup(stream);
|
|
uvc_video_clock_cleanup(stream);
|
|
|
|
|
|
return ret;
|
|
return ret;
|