summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.h
diff options
context:
space:
mode:
authorLuiz Fernando Capitulino <lcapitulino@mandriva.com.br>2006-03-24 21:12:31 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 20:12:20 +0200
commit1ce7dd26e0f0e34bb75ec56f7f546151af34fcf9 (patch)
tree38635f09e5d02ef4cedba02fe1f8892cade6690b /drivers/usb/serial/usb-serial.h
parent[PATCH] USB: g_file_storage: add comment about buffer allocation (diff)
downloadlinux-1ce7dd26e0f0e34bb75ec56f7f546151af34fcf9.tar.xz
linux-1ce7dd26e0f0e34bb75ec56f7f546151af34fcf9.zip
[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 d7d27c3385b3..dc89d8710460 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;