From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758628AbcAKGmE (ORCPT ); Mon, 11 Jan 2016 01:42:04 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34049 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758596AbcAKGl7 (ORCPT ); Mon, 11 Jan 2016 01:41:59 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Peter Hurley Subject: [PATCH v3 04/19] NFC: nci: Remove dead code Date: Sun, 10 Jan 2016 22:40:53 -0800 Message-Id: <1452494468-21359-5-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1452494468-21359-1-git-send-email-peter@hurleysoftware.com> References: <1452400870-6005-1-git-send-email-peter@hurleysoftware.com> <1452494468-21359-1-git-send-email-peter@hurleysoftware.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The N_NCI ldisc does not define a flush_buffer() ldisc method, so the check when opening the ldisc is always false. Signed-off-by: Peter Hurley --- net/nfc/nci/uart.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c index 21d8875..c468eab 100644 --- a/net/nfc/nci/uart.c +++ b/net/nfc/nci/uart.c @@ -171,14 +171,7 @@ static int nci_uart_tty_open(struct tty_struct *tty) tty->disc_data = NULL; tty->receive_room = 65536; - /* Flush any pending characters in the driver and line discipline. */ - - /* FIXME: why is this needed. Note don't use ldisc_ref here as the - * open path is before the ldisc is referencable. - */ - - if (tty->ldisc->ops->flush_buffer) - tty->ldisc->ops->flush_buffer(tty); + /* Flush any pending characters in the driver */ tty_driver_flush_buffer(tty); return 0; -- 2.7.0