X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fgeneric_serial.h;fp=include%2Flinux%2Fgeneric_serial.h;h=0abe9d9a0069d9b17e4771a9a5aaffb394402556;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=e2538456195568141da767ace0da9ec5abe08a3d;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index e25384561..0abe9d9a0 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h @@ -12,9 +12,6 @@ #ifndef GENERIC_SERIAL_H #define GENERIC_SERIAL_H -#ifdef __KERNEL__ -#include - struct real_driver { void (*disable_tx_interrupts) (void *); void (*enable_tx_interrupts) (void *); @@ -37,7 +34,7 @@ struct gs_port { int xmit_head; int xmit_tail; int xmit_cnt; - struct mutex port_write_mutex; + struct semaphore port_write_sem; int flags; wait_queue_head_t open_wait; wait_queue_head_t close_wait; @@ -55,7 +52,6 @@ struct gs_port { spinlock_t driver_lock; }; -#endif /* __KERNEL__ */ /* Flags */ /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" @@ -77,7 +73,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); @@ -96,5 +92,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