Bluetooth: hci_ldisc: Remove dead code
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 27 Nov 2015 21:39:00 +0000 (16:39 -0500)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2015 23:51:50 +0000 (00:51 +0100)
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>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_ldisc.c

index 03146d707a95cbee41917425a64cc59252885791..73202624133b4e180a45c75f12ae329cc934bac0 100644 (file)
@@ -462,13 +462,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;