]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/tty.h
[PATCH] leds: Amstrad Delta LED support
[linux-2.6-omap-h63xx.git] / include / linux / tty.h
index a7bd3b4558d26efaa3ed8dae0b5bb53f0d184cab..cb35ca50a0a66feffff3a63b598634efc9f1f027 100644 (file)
@@ -16,7 +16,6 @@
                   consoles 16 and higher (since it returns a short) */
 
 #ifdef __KERNEL__
-#include <linux/config.h>
 #include <linux/fs.h>
 #include <linux/major.h>
 #include <linux/termios.h>
@@ -24,6 +23,7 @@
 #include <linux/tty_driver.h>
 #include <linux/tty_ldisc.h>
 #include <linux/screen_info.h>
+#include <linux/mutex.h>
 
 #include <asm/system.h>
 
@@ -58,6 +58,8 @@ struct tty_buffer {
        int used;
        int size;
        int active;
+       int commit;
+       int read;
        /* Data points here */
        unsigned long data[0];
 };
@@ -229,8 +231,8 @@ struct tty_struct {
        int canon_data;
        unsigned long canon_head;
        unsigned int canon_column;
-       struct semaphore atomic_read;
-       struct semaphore atomic_write;
+       struct mutex atomic_read_lock;
+       struct mutex atomic_write_lock;
        unsigned char *write_buf;
        int write_cnt;
        spinlock_t read_lock;
@@ -288,7 +290,9 @@ extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc);
 extern int tty_unregister_ldisc(int disc);
 extern int tty_register_driver(struct tty_driver *driver);
 extern int tty_unregister_driver(struct tty_driver *driver);
-extern void tty_register_device(struct tty_driver *driver, unsigned index, struct device *dev);
+extern struct class_device *tty_register_device(struct tty_driver *driver,
+                                               unsigned index,
+                                               struct device *dev);
 extern void tty_unregister_device(struct tty_driver *driver, unsigned index);
 extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
                             int buflen);
@@ -317,8 +321,7 @@ extern void tty_ldisc_put(int);
 extern void tty_wakeup(struct tty_struct *tty);
 extern void tty_ldisc_flush(struct tty_struct *tty);
 
-struct semaphore;
-extern struct semaphore tty_sem;
+extern struct mutex tty_mutex;
 
 /* n_tty.c */
 extern struct tty_ldisc tty_ldisc_N_TTY;