From 47e01ca0b2bc9e796927fe93340f11221521b4e2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Sun, 5 Oct 2008 09:22:10 +0200 Subject: gspca: Don't destroy the URBs on disconnect. From: Jean-Francois Moine Priority: normal Signed-off-by: Jean-Francois Moine --- linux/drivers/media/video/gspca/gspca.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 12e3a4360..c2ad862b6 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -1913,17 +1913,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"); -- cgit v1.2.3