When hotplug removing an hvcs device, we need to ensure the
hangup processing is done prior to exiting the remove function,
so use tty_vhangup to do the hangup processing directly
rather than using tty_hangup which simply schedules the hangup
work for later execution.

Signed-off-by: Brian King <brk...@linux.vnet.ibm.com>
---
 drivers/tty/hvc/hvcs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 04c58ac4fec2..2e9e45f06916 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -824,12 +824,11 @@ static void hvcs_remove(struct vio_dev *dev)
        tty_port_put(&hvcsd->port);
 
        /*
-        * The hangup is a scheduled function which will auto chain call
-        * hvcs_hangup.  The tty should always be valid at this time unless a
+        * The tty should always be valid at this time unless a
         * simultaneous tty close already cleaned up the hvcs_struct.
         */
        if (tty) {
-               tty_hangup(tty);
+               tty_vhangup(tty);
                tty_kref_put(tty);
        }
 
-- 
2.31.1

Reply via email to