X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=drivers%2Ftty%2Ftty_io.c;h=d3e71331641bcf267a5ebee49083f6c277cadb0b;hb=8f166e00196fcb16364c9c39dab6fe7b72e63f18;hp=16a2c0237dd60a06513e2ad1f616e13a7bd71c0b;hpb=f1bfbd984b4e2177886507b6a0ec5faeb6d7c217;p=linux-2.6-block.git diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 16a2c0237dd6..d3e71331641b 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -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..