aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-10-16 14:59:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-05 19:26:13 -0500
commit5b239542207d83687489a22e6dd93ffef1ad9eb9 (patch)
tree040f182e92689cad6f921ecfc4c67299c432aba7 /drivers/tty/tty_io.c
parent8a8a55105dd2857743dc4f7097f28a6cb2e696ee (diff)
tty: Replace open-coded tty_get_pgrp()
Replace open-coded instances of tty_get_pgrp(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 3d71642b18ad..6bf5f44d215e 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2324,18 +2324,14 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
2324int tty_do_resize(struct tty_struct *tty, struct winsize *ws) 2324int tty_do_resize(struct tty_struct *tty, struct winsize *ws)
2325{ 2325{
2326 struct pid *pgrp; 2326 struct pid *pgrp;
2327 unsigned long flags;
2328 2327
2329 /* Lock the tty */ 2328 /* Lock the tty */
2330 mutex_lock(&tty->winsize_mutex); 2329 mutex_lock(&tty->winsize_mutex);
2331 if (!memcmp(ws, &tty->winsize, sizeof(*ws))) 2330 if (!memcmp(ws, &tty->winsize, sizeof(*ws)))
2332 goto done; 2331 goto done;
2333 /* Get the PID values and reference them so we can
2334 avoid holding the tty ctrl lock while sending signals */
2335 spin_lock_irqsave(&tty->ctrl_lock, flags);
2336 pgrp = get_pid(tty->pgrp);
2337 spin_unlock_irqrestore(&tty->ctrl_lock, flags);
2338 2332
2333 /* Signal the foreground process group */
2334 pgrp = tty_get_pgrp(tty);
2339 if (pgrp) 2335 if (pgrp)
2340 kill_pgrp(pgrp, SIGWINCH, 1); 2336 kill_pgrp(pgrp, SIGWINCH, 1);
2341 put_pid(pgrp); 2337 put_pid(pgrp);