Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305432

[PATCH v2 03/19] bluetooth: hci_ldisc: Remove dead code

From Peter Hurley <peter@hurleysoftware.com>
Newsgroups linux.kernel
Subject [PATCH v2 03/19] bluetooth: hci_ldisc: Remove dead code
Date 2016-01-10 05:50 +0100
Message-ID <qPg70-7Hn-35@gated-at.bofh.it> (permalink)
References <qzyUh-8cQ-9@gated-at.bofh.it> <qPg6Z-7Hn-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The N_HCI ldisc does not define a flush_buffer() ldisc method, so
the check when opening the ldisc is always false.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 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.7.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/19] Fix driver crashes on hangup Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 05/19] tty: Remove chars_in_buffer() line discipline method Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 14/19] tty: Move tty_ldisc_kill() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 01/19] staging: digi: Replace open-coded tty_wakeup() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 12/19] tty: Prepare for destroying line discipline on hangup Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 08/19] tty: Reset c_line from driver's init_termios Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 02/19] serial: 68328: Remove bogus ldisc reset Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 16/19] tty: Refactor tty_ldisc_reinit() for reuse Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v2 03/19] bluetooth: hci_ldisc: Remove dead code Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 05:50 +0100
  [PATCH v3 19/19] tty: Avoid unnecessary temporaries for tty->ldisc Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 17/19] tty: Destroy ldisc instance on hangup Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 08/19] tty: Reset c_line from driver's init_termios Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 06/19] tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 04/19] NFC: nci: Remove dead code Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 15/19] tty: Use 'disc' for line discipline index name Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 01/19] staging: digi: Replace open-coded tty_wakeup() Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 14/19] tty: Move tty_ldisc_kill() Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 05/19] tty: Remove chars_in_buffer() line discipline method Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 02/19] serial: 68328: Remove bogus ldisc reset Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
    Re: [PATCH v3 02/19] serial: 68328: Remove bogus ldisc reset One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-01-11 15:20 +0100
  [PATCH v3 13/19] tty: Handle NULL tty->ldisc Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 12/19] tty: Prepare for destroying line discipline on hangup Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 03/19] bluetooth: hci_ldisc: Remove dead code Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 10/19] tty: Fix comments for tty_ldisc_get() Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 07/19] n_tty: Fix unsafe reference to "other" ldisc Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 11/19] tty: Fix comments for tty_ldisc_release() Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 09/19] staging/speakup: Use tty_ldisc_ref() for paste kworker Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 18/19] tty: Document c_line == N_TTY initial condition Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 16/19] tty: Refactor tty_ldisc_reinit() for reuse Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100
  [PATCH v3 00/19] Fix driver crashes on hangup Peter Hurley <peter@hurleysoftware.com> - 2016-01-11 07:50 +0100

csiph-web