Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306309
b: refs/heads/master
c: eb23873
h: refs/heads/master
i:
  306307: 2b6140f
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent a1034b4 commit f40e537
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2d887c5fea33f341fd0d2a1487150473cf69014
refs/heads/master: eb238732a52b100bdf4a766a50e11e6fd9bd1d83
22 changes: 11 additions & 11 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,16 +595,12 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev)
static void gspca_stream_off(struct gspca_dev *gspca_dev)
{
gspca_dev->streaming = 0;
if (gspca_dev->present) {
if (gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
gspca_input_destroy_urb(gspca_dev);
gspca_set_alt0(gspca_dev);
gspca_input_create_urb(gspca_dev);
}

/* always call stop0 to free the subdriver's resources */
if (gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
gspca_input_destroy_urb(gspca_dev);
gspca_set_alt0(gspca_dev);
gspca_input_create_urb(gspca_dev);
if (gspca_dev->sd_desc->stop0)
gspca_dev->sd_desc->stop0(gspca_dev);
PDEBUG(D_STREAM, "stream off OK");
Expand Down Expand Up @@ -2369,7 +2365,6 @@ void gspca_disconnect(struct usb_interface *intf)
usb_set_intfdata(intf, NULL);
gspca_dev->dev = NULL;
gspca_dev->present = 0;
wake_up_interruptible(&gspca_dev->wq);
destroy_urbs(gspca_dev);

#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
Expand All @@ -2380,6 +2375,11 @@ void gspca_disconnect(struct usb_interface *intf)
input_unregister_device(input_dev);
}
#endif
/* Free subdriver's streaming resources / stop sd workqueue(s) */
if (gspca_dev->sd_desc->stop0 && gspca_dev->streaming)
gspca_dev->sd_desc->stop0(gspca_dev);
gspca_dev->streaming = 0;
wake_up_interruptible(&gspca_dev->wq);

v4l2_device_disconnect(&gspca_dev->v4l2_dev);
video_unregister_device(&gspca_dev->vdev);
Expand Down

0 comments on commit f40e537

Please sign in to comment.