aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_ldisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/hci_ldisc.c')
-rw-r--r--drivers/bluetooth/hci_ldisc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 7e31d5f1bc8a..a6c2619ec782 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -143,7 +143,7 @@ restart:
143 int len; 143 int len;
144 144
145 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); 145 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
146 len = tty->driver->write(tty, skb->data, skb->len); 146 len = tty->ops->write(tty, skb->data, skb->len);
147 hdev->stat.byte_tx += len; 147 hdev->stat.byte_tx += len;
148 148
149 skb_pull(skb, len); 149 skb_pull(skb, len);
@@ -190,8 +190,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
190 190
191 /* Flush any pending characters in the driver and discipline. */ 191 /* Flush any pending characters in the driver and discipline. */
192 tty_ldisc_flush(tty); 192 tty_ldisc_flush(tty);
193 if (tty->driver && tty->driver->flush_buffer) 193 tty_driver_flush_buffer(tty);
194 tty->driver->flush_buffer(tty);
195 194
196 if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) 195 if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
197 hu->proto->flush(hu); 196 hu->proto->flush(hu);
@@ -285,9 +284,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
285 284
286 if (tty->ldisc.flush_buffer) 285 if (tty->ldisc.flush_buffer)
287 tty->ldisc.flush_buffer(tty); 286 tty->ldisc.flush_buffer(tty);
288 287 tty_driver_flush_buffer(tty);
289 if (tty->driver && tty->driver->flush_buffer)
290 tty->driver->flush_buffer(tty);
291 288
292 return 0; 289 return 0;
293} 290}
@@ -374,8 +371,8 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *f
374 spin_unlock(&hu->rx_lock); 371 spin_unlock(&hu->rx_lock);
375 372
376 if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) && 373 if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) &&
377 tty->driver->unthrottle) 374 tty->ops->unthrottle)
378 tty->driver->unthrottle(tty); 375 tty->ops->unthrottle(tty);
379} 376}
380 377
381static int hci_uart_register_dev(struct hci_uart *hu) 378static int hci_uart_register_dev(struct hci_uart *hu)