From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755430AbbK0Vjn (ORCPT ); Fri, 27 Nov 2015 16:39:43 -0500 Received: from mail-ig0-f180.google.com ([209.85.213.180]:38556 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754835AbbK0Vji (ORCPT ); Fri, 27 Nov 2015 16:39:38 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Andi Kleen , Peter Hurley , Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org Subject: [PATCH 03/19] bluetooth: hci_ldisc: Remove dead code Date: Fri, 27 Nov 2015 16:39:00 -0500 Message-Id: <1448660356-6328-4-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_HCI ldisc does not define a flush_buffer() ldisc method, so the check when opening the ldisc is always false. Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Signed-off-by: Peter Hurley --- drivers/bluetooth/hci_ldisc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 96bcec5..c303f87 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -461,13 +461,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) INIT_WORK(&hu->init_ready, hci_uart_init_work); INIT_WORK(&hu->write_work, hci_uart_write_work); - /* 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