Bluetooth: hci_uart: Remove the manual protocol init message
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Apr 2015 05:27:35 +0000 (22:27 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Apr 2015 16:47:10 +0000 (18:47 +0200)
The init function for each HCI UART protocol prints the same on success
and failure. This information is so generic, remove it and let the main
HCI UART handling print it instead.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_ath.c
drivers/bluetooth/hci_bcsp.c
drivers/bluetooth/hci_h4.c
drivers/bluetooth/hci_h5.c
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_ll.c

index 32c46cd40d85cddf890cc3576d95b100fc4de1c8..54af95c95b07ada3bac38982fdbebb77c9b052bb 100644 (file)
@@ -218,14 +218,7 @@ static const struct hci_uart_proto athp = {
 
 int __init ath_init(void)
 {
-       int err = hci_uart_register_proto(&athp);
-
-       if (!err)
-               BT_INFO("HCIATH3K protocol initialized");
-       else
-               BT_ERR("HCIATH3K protocol registration failed");
-
-       return err;
+       return hci_uart_register_proto(&athp);
 }
 
 int __exit ath_deinit(void)
index 285fd0a97311e473f4c440638f413278fc53ba6e..a467aa28009ad54f1d6159ef1690a2b67ab3ca66 100644 (file)
@@ -748,14 +748,7 @@ static const struct hci_uart_proto bcsp = {
 
 int __init bcsp_init(void)
 {
-       int err = hci_uart_register_proto(&bcsp);
-
-       if (!err)
-               BT_INFO("HCI BCSP protocol initialized");
-       else
-               BT_ERR("HCI BCSP protocol registration failed");
-
-       return err;
+       return hci_uart_register_proto(&bcsp);
 }
 
 int __exit bcsp_deinit(void)
index 7c5e68cb99595a0e0fc7cf4fa37517e4af8fb85c..81ad249fc44f639f64faf4fff7a827b84749e603 100644 (file)
@@ -152,14 +152,7 @@ static const struct hci_uart_proto h4p = {
 
 int __init h4_init(void)
 {
-       int err = hci_uart_register_proto(&h4p);
-
-       if (!err)
-               BT_INFO("HCI H4 protocol initialized");
-       else
-               BT_ERR("HCI H4 protocol registration failed");
-
-       return err;
+       return hci_uart_register_proto(&h4p);
 }
 
 int __exit h4_deinit(void)
index de7da17ccdab42906938920bd40757059d307555..3455cecc9ecfe630c3331d67d22715ddb60cfcf8 100644 (file)
@@ -756,14 +756,7 @@ static const struct hci_uart_proto h5p = {
 
 int __init h5_init(void)
 {
-       int err = hci_uart_register_proto(&h5p);
-
-       if (!err)
-               BT_INFO("HCI Three-wire UART (H5) protocol initialized");
-       else
-               BT_ERR("HCI Three-wire UART (H5) protocol init failed");
-
-       return err;
+       return hci_uart_register_proto(&h5p);
 }
 
 int __exit h5_deinit(void)
index ba3b988ce60aca82e0e9939dd1f17adbc897d250..19d0960489b6eb41602328e45dfc737d69641c90 100644 (file)
@@ -60,6 +60,8 @@ int hci_uart_register_proto(const struct hci_uart_proto *p)
 
        hup[p->id] = p;
 
+       BT_INFO("HCI UART protocol %s registered", p->name);
+
        return 0;
 }
 
index c6a1aeb4e7fb55de93dd95248948a823973ee204..9ee24b075f7973e7578043c74e7421ddd535b7b5 100644 (file)
@@ -518,14 +518,7 @@ static const struct hci_uart_proto llp = {
 
 int __init ll_init(void)
 {
-       int err = hci_uart_register_proto(&llp);
-
-       if (!err)
-               BT_INFO("HCILL protocol initialized");
-       else
-               BT_ERR("HCILL protocol registration failed");
-
-       return err;
+       return hci_uart_register_proto(&llp);
 }
 
 int __exit ll_deinit(void)