summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.h
diff options
context:
space:
mode:
authorLuiz Fernando Capitulino <lcapitulino@mandriva.com.br>2006-03-24 17:12:31 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 11:12:20 -0700
commit1ce7dd26e0f0e34bb75ec56f7f546151af34fcf9 (patch)
tree38635f09e5d02ef4cedba02fe1f8892cade6690b /drivers/usb/serial/usb-serial.h
parent14cd5f8e85e90c9dead2393377b9a2c23131e0ce (diff)
downloadop-kernel-dev-1ce7dd26e0f0e34bb75ec56f7f546151af34fcf9.zip
op-kernel-dev-1ce7dd26e0f0e34bb75ec56f7f546151af34fcf9.tar.gz
[PATCH] USB serial: Converts port semaphore to mutexes.
The usbserial's port semaphore used to synchronize serial_open() and serial_close() are strict mutexes, convert them to the mutex implementation. Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/usb-serial.h')
-rw-r--r--drivers/usb/serial/usb-serial.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
index d7d27c3..dc89d87 100644
--- a/drivers/usb/serial/usb-serial.h
+++ b/drivers/usb/serial/usb-serial.h
@@ -16,7 +16,7 @@
#include <linux/config.h>
#include <linux/kref.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */
#define SERIAL_TTY_MINORS 255 /* loads of devices :) */
@@ -31,7 +31,7 @@
* @serial: pointer back to the struct usb_serial owner of this port.
* @tty: pointer to the corresponding tty for this port.
* @lock: spinlock to grab when updating portions of this structure.
- * @sem: semaphore used to synchronize serial_open() and serial_close()
+ * @mutex: mutex used to synchronize serial_open() and serial_close()
* access for this port.
* @number: the number of the port (the minor number).
* @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
@@ -63,7 +63,7 @@ struct usb_serial_port {
struct usb_serial * serial;
struct tty_struct * tty;
spinlock_t lock;
- struct semaphore sem;
+ struct mutex mutex;
unsigned char number;
unsigned char * interrupt_in_buffer;
OpenPOWER on IntegriCloud