This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / linux / generic_serial.h
index c82cad4..e253845 100644 (file)
@@ -12,6 +12,9 @@
 #ifndef GENERIC_SERIAL_H
 #define GENERIC_SERIAL_H
 
+#ifdef __KERNEL__
+#include <linux/mutex.h>
+
 struct real_driver {
   void                    (*disable_tx_interrupts) (void *);
   void                    (*enable_tx_interrupts) (void *);
@@ -34,7 +37,7 @@ struct gs_port {
   int                     xmit_head;
   int                     xmit_tail;
   int                     xmit_cnt;
-  struct semaphore        port_write_sem;
+  struct mutex            port_write_mutex;
   int                     flags;
   wait_queue_head_t       open_wait;
   wait_queue_head_t       close_wait;
@@ -42,7 +45,7 @@ struct gs_port {
   int                     blocked_open;
   struct tty_struct       *tty;
   unsigned long           event;
-  unsigned int            closing_wait;
+  unsigned short          closing_wait;
   int                     close_delay;
   struct real_driver      *rd;
   int                     wakeup_chars;
@@ -52,6 +55,7 @@ struct gs_port {
   spinlock_t              driver_lock;
 };
 
+#endif /* __KERNEL__ */
 
 /* Flags */
 /* Warning: serial.h defines some ASYNC_ flags, they say they are "only"
@@ -73,7 +77,7 @@ struct gs_port {
 #define GS_DEBUG_FLOW    0x00000020
 #define GS_DEBUG_WRITE   0x00000040
 
-
+#ifdef __KERNEL__
 void gs_put_char(struct tty_struct *tty, unsigned char ch);
 int  gs_write(struct tty_struct *tty, 
              const unsigned char *buf, int count);
@@ -92,5 +96,5 @@ int  gs_init_port(struct gs_port *port);
 int  gs_setserial(struct gs_port *port, struct serial_struct __user *sp);
 int  gs_getserial(struct gs_port *port, struct serial_struct __user *sp);
 void gs_got_break(struct gs_port *port);
-
+#endif /* __KERNEL__ */
 #endif