tty: Remove tty_pair_get_tty()/tty_pair_get_pty() api
[linux-2.6-block.git] / drivers / tty / tty_io.c
index 16a2c0237dd60a06513e2ad1f616e13a7bd71c0b..d3e71331641bcf267a5ebee49083f6c277cadb0b 100644 (file)
@@ -1024,14 +1024,12 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
 }
 
 static void tty_write_unlock(struct tty_struct *tty)
-       __releases(&tty->atomic_write_lock)
 {
        mutex_unlock(&tty->atomic_write_lock);
        wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
 }
 
 static int tty_write_lock(struct tty_struct *tty, int ndelay)
-       __acquires(&tty->atomic_write_lock)
 {
        if (!mutex_trylock(&tty->atomic_write_lock)) {
                if (ndelay)
@@ -2705,23 +2703,17 @@ static int tty_tiocgicount(struct tty_struct *tty, void __user *arg)
        return 0;
 }
 
-struct tty_struct *tty_pair_get_tty(struct tty_struct *tty)
+/*
+ * if pty, return the slave side (real_tty)
+ * otherwise, return self
+ */
+static struct tty_struct *tty_pair_get_tty(struct tty_struct *tty)
 {
        if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
            tty->driver->subtype == PTY_TYPE_MASTER)
                tty = tty->link;
        return tty;
 }
-EXPORT_SYMBOL(tty_pair_get_tty);
-
-struct tty_struct *tty_pair_get_pty(struct tty_struct *tty)
-{
-       if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
-           tty->driver->subtype == PTY_TYPE_MASTER)
-           return tty;
-       return tty->link;
-}
-EXPORT_SYMBOL(tty_pair_get_pty);
 
 /*
  * Split this up, as gcc can choke on it otherwise..