From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755476AbbK0Vjs (ORCPT ); Fri, 27 Nov 2015 16:39:48 -0500 Received: from mail-ig0-f176.google.com ([209.85.213.176]:34461 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755349AbbK0Vjk (ORCPT ); Fri, 27 Nov 2015 16:39:40 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Andi Kleen , Peter Hurley , Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , "David S. Miller" , linux-wireless@vger.kernel.org Subject: [PATCH 04/19] NFC: nci: Remove dead code Date: Fri, 27 Nov 2015 16:39:01 -0500 Message-Id: <1448660356-6328-5-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448660356-6328-1-git-send-email-peter@hurleysoftware.com> References: <1448660356-6328-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. Cc: Lauro Ramos Venancio Cc: Aloisio Almeida Jr Cc: Samuel Ortiz Cc: "David S. Miller" Cc: 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.6.3