Hi,

this makes mdc800 take the necessary lock in disconnect() to prevent
submission of an URB for a disconnected device.

        Regards
                Oliver

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>

--- a/drivers/usb/mdc800.c	2007-01-05 16:59:45.000000000 +0100
+++ b/drivers/usb/mdc800.c	2007-01-05 16:59:50.000000000 +0100
@@ -523,7 +523,8 @@
 
 	if (mdc800->state == NOT_CONNECTED)
 		return;
-	
+
+	down (&mdc800->io_lock);
 	mdc800->state=NOT_CONNECTED;
 
 	usb_unlink_urb (mdc800->irq_urb);
@@ -533,6 +534,7 @@
 	usb_driver_release_interface (&mdc800_usb_driver, &dev->actconfig->interface[1]);
 
 	mdc800->dev=0;
+	up (&mdc800->io_lock);
 	info ("Mustek MDC800 disconnected from USB.");
 }
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to