Skip to content

Commit

Permalink
V4L/DVB (9119): gspca: Don't destroy the URBs on disconnect.
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 79a9098 commit 3145b8c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1903,17 +1903,12 @@ void gspca_disconnect(struct usb_interface *intf)

usb_set_intfdata(intf, NULL);

gspca_dev->present = 0;
mutex_lock(&gspca_dev->queue_lock);
mutex_lock(&gspca_dev->usb_lock);
gspca_dev->streaming = 0;
destroy_urbs(gspca_dev);
mutex_unlock(&gspca_dev->usb_lock);
mutex_unlock(&gspca_dev->queue_lock);

/* We don't want people trying to open up the device */
video_unregister_device(&gspca_dev->vdev);

gspca_dev->present = 0;
gspca_dev->streaming = 0;

kref_put(&gspca_dev->kref, gspca_delete);

PDEBUG(D_PROBE, "disconnect complete");
Expand Down

0 comments on commit 3145b8c

Please sign in to comment.