]> Git Repo - linux.git/blobdiff - drivers/bluetooth/hci_ldisc.c
dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports
[linux.git] / drivers / bluetooth / hci_ldisc.c
index 71a4ca505e09e6b339d56940663ccd892a733ed1..5ed2cfa7da1d9e116198f3742ef29d53cb4128cb 100644 (file)
@@ -593,7 +593,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
  * Return Value:    None
  */
 static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
-                                char *flags, int count)
+                                const char *flags, int count)
 {
        struct hci_uart *hu = tty->disc_data;
 
@@ -821,6 +821,7 @@ static __poll_t hci_uart_tty_poll(struct tty_struct *tty,
 
 static struct tty_ldisc_ops hci_uart_ldisc = {
        .owner          = THIS_MODULE,
+       .num            = N_HCI,
        .name           = "n_hci",
        .open           = hci_uart_tty_open,
        .close          = hci_uart_tty_close,
@@ -840,7 +841,7 @@ static int __init hci_uart_init(void)
        BT_INFO("HCI UART driver ver %s", VERSION);
 
        /* Register the tty discipline */
-       err = tty_register_ldisc(N_HCI, &hci_uart_ldisc);
+       err = tty_register_ldisc(&hci_uart_ldisc);
        if (err) {
                BT_ERR("HCI line discipline registration failed. (%d)", err);
                return err;
@@ -882,8 +883,6 @@ static int __init hci_uart_init(void)
 
 static void __exit hci_uart_exit(void)
 {
-       int err;
-
 #ifdef CONFIG_BT_HCIUART_H4
        h4_deinit();
 #endif
@@ -915,10 +914,7 @@ static void __exit hci_uart_exit(void)
        mrvl_deinit();
 #endif
 
-       /* Release tty registration of line discipline */
-       err = tty_unregister_ldisc(N_HCI);
-       if (err)
-               BT_ERR("Can't unregister HCI line discipline (%d)", err);
+       tty_unregister_ldisc(&hci_uart_ldisc);
 }
 
 module_init(hci_uart_init);
This page took 0.037327 seconds and 4 git commands to generate.