Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252Ab2FDLhp (ORCPT ); Mon, 4 Jun 2012 07:37:45 -0400 Received: from mail.pripojeni.net ([178.22.112.14]:44981 "EHLO smtp.pripojeni.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754454Ab2FDLfo (ORCPT ); Mon, 4 Jun 2012 07:35:44 -0400 From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: alan@linux.intel.com, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Samuel Ortiz , netdev@vger.kernel.org Subject: [PATCH 10/24] TTY: ircomm, use tty_port_close_end helper Date: Mon, 4 Jun 2012 13:35:24 +0200 Message-Id: <1338809738-18967-11-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1338809738-18967-1-git-send-email-jslaby@suse.cz> References: <1338809738-18967-1-git-send-email-jslaby@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1394 Lines: 45 Again, the code is identical, so leverage the helper code. Signed-off-by: Jiri Slaby Cc: Samuel Ortiz Cc: netdev@vger.kernel.org --- net/irda/ircomm/ircomm_tty.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 3fdce18..cfe352d 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c @@ -568,21 +568,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) tty_driver_flush_buffer(tty); tty_ldisc_flush(tty); - spin_lock_irqsave(&port->lock, flags); - tty->closing = 0; - - if (port->blocked_open) { - if (port->close_delay) { - spin_unlock_irqrestore(&port->lock, flags); - schedule_timeout_interruptible(port->close_delay); - spin_lock_irqsave(&port->lock, flags); - } - wake_up_interruptible(&port->open_wait); - } - - port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); - spin_unlock_irqrestore(&port->lock, flags); - wake_up_interruptible(&port->close_wait); + tty_port_close_end(port, tty); tty_port_tty_set(port, NULL); } -- 1.7.10.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/