static void gspca_stream_off(struct gspca_dev *gspca_dev)
{
gspca_dev->streaming = 0;
+ gspca_dev->usb_err = 0;
if (gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
/* if the file did the capture, free the streaming resources */
if (gspca_dev->capt_file == file) {
- if (gspca_dev->streaming) {
- gspca_dev->usb_err = 0;
+ if (gspca_dev->streaming)
gspca_stream_off(gspca_dev);
- }
frame_free(gspca_dev);
}
module_put(gspca_dev->module);
/* stop streaming */
streaming = gspca_dev->streaming;
if (streaming) {
- gspca_dev->usb_err = 0;
gspca_stream_off(gspca_dev);
/* Don't restart the stream when switching from read
}
/* stop streaming */
- gspca_dev->usb_err = 0;
gspca_stream_off(gspca_dev);
/* In case another thread is waiting in dqbuf */
wake_up_interruptible(&gspca_dev->wq);