From: Al Viro Date: Thu, 18 Aug 2011 19:08:19 +0000 (+0100) Subject: um: take register_winch_irq() into the caller of is_skas_winch() X-Git-Tag: MMI-PSA29.97-13-9~18152^2~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17e052093bcd21eaf9eb6e792cd76fdc4f0e3505;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git um: take register_winch_irq() into the caller of is_skas_winch() Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 7ed06a7399d5..f180813ce2c7 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c @@ -281,7 +281,12 @@ void register_winch(int fd, struct tty_struct *tty) return; pid = tcgetpgrp(fd); - if (!is_skas_winch(pid, fd, tty) && (pid == -1)) { + if (is_skas_winch(pid, fd, tty)) { + register_winch_irq(-1, fd, -1, tty, 0); + return; + } + + if (pid == -1) { thread = winch_tramp(fd, tty, &thread_fd, &stack); if (thread < 0) return; diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 30f1bb43a230..29e4ab7eb369 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -26,11 +26,7 @@ int is_skas_winch(int pid, int fd, void *data) { - if (pid != getpgrp()) - return 0; - - register_winch_irq(-1, fd, -1, data, 0); - return 1; + return pid == getpgrp(); } static int ptrace_dump_regs(int pid)