# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.456.2.5 -> 1.456.2.6
#	drivers/usb/misc/tiglusb.c	1.2     -> 1.3    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/10	rlievin@free.fr	1.456.2.6
# [PATCH] tiglusb mutex bugfix
# 
# USB tiglusb driver
# 
# Fixes a locking bug, and changes the command line option, as
# it was clashing with another part of the kernel.
# --------------------------------------------
#
diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c
--- a/drivers/usb/misc/tiglusb.c	Tue Apr 16 11:35:51 2002
+++ b/drivers/usb/misc/tiglusb.c	Tue Apr 16 11:35:51 2002
@@ -33,7 +33,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "1.02"
+#define DRIVER_VERSION "1.03"
 #define DRIVER_AUTHOR  "Romain Lievin <roms@lpg.ticalc.org> & Julien Blache <jb@jblache.org>"
 #define DRIVER_DESC    "TI-GRAPH LINK USB (aka SilverLink) driver"
 #define DRIVER_LICENSE "GPL"
@@ -383,6 +383,7 @@
 	wake_up (&s->wait);
 	if (s->state == _started)
 		sleep_on (&s->remove_ok);
+	down (&s->mutex);
 	s->dev = NULL;
 	s->opened = 0;
 
@@ -479,7 +480,7 @@
 
 /* --------------------------------------------------------------------- */
 
-__setup ("tipar=", tiglusb_setup);
+__setup ("tiusb=", tiglusb_setup);
 module_init (tiglusb_init);
 module_exit (tiglusb_cleanup);
 
