Skip to contentSkip to conversation

bluetooth: hci_uart: remove unused hci_uart_init_tty

PATCH In review Rob Herring 2 participants 3 messages Jan 18, 2017 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth: hci_uart: remove unused hci_uart_init_tty

There are no users of hci_uart_init_tty, so remove it.

Cc Marcel Holtmann <[email protected]>
Cc Gustavo Padovan <[email protected]>
Cc Johan Hedberg <[email protected]>
---
 drivers/bluetooth/hci_ldisc.c | 19 -------------------
 drivers/bluetooth/hci_uart.h  |  1 -
 2 files changed, 20 deletions(-)
drivers/bluetooth/hci_ldisc.c +0 -19
index 9497c469efd2..de20a438a78a 100644
@@ -318,25 +318,6 @@ void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
 	hu->oper_speed = oper_speed;
 }
 
-void hci_uart_init_tty(struct hci_uart *hu)
-{
-	struct tty_struct *tty = hu->tty;
-	struct ktermios ktermios;
-
-	/* Bring the UART into a known 8 bits no parity hw fc state */
-	ktermios = tty->termios;
-	ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP |
-			      INLCR | IGNCR | ICRNL | IXON);
-	ktermios.c_oflag &= ~OPOST;
-	ktermios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
-	ktermios.c_cflag &= ~(CSIZE | PARENB);
-	ktermios.c_cflag |= CS8;
-	ktermios.c_cflag |= CRTSCTS;
-
-	/* tty_set_termios() return not checked as it is always 0 */
-	tty_set_termios(tty, &ktermios);
-}
-
 void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed)
 {
 	struct tty_struct *tty = hu->tty;
drivers/bluetooth/hci_uart.h +0 -1
index 070139513e65..cb7f4b4aeca0 100644
@@ -107,7 +107,6 @@ int hci_uart_register_proto(const struct hci_uart_proto *p);
 int hci_uart_unregister_proto(const struct hci_uart_proto *p);
 int hci_uart_tx_wakeup(struct hci_uart *hu);
 int hci_uart_init_ready(struct hci_uart *hu);
-void hci_uart_init_tty(struct hci_uart *hu);
 void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed);
 void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
 void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
Signature · 1 line
2.10.1
maintainer
#1 lore raw

Hi Rob,

Quoted 1 line

There are no users of hci_uart_init_tty, so remove it.

really? Hmmm, it was suppose to be used by the Broadcom UART drivers. Maybe it would be actually prudent if drivers call it instead of relying on what btattach uses to set before activation the line discipline.

Regards

Marcel

#2 lore raw
Quoted 5 lines · Marcel Holtmann

Hi Rob,

Quoted 1 line

There are no users of hci_uart_init_tty, so remove it.

really? Hmmm, it was suppose to be used by the Broadcom UART drivers. Maybe it would be actually prudent if drivers call it instead of relying on what btattach uses to set before activation the line discipline.

I stole the code for serdev if that makes you feel better. :)

Rob