Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: hci_uart: Remove the manual protocol init message

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>

+7 -40
+1 -8
drivers/bluetooth/hci_ath.c
··· 218 218 219 219 int __init ath_init(void) 220 220 { 221 - int err = hci_uart_register_proto(&athp); 222 - 223 - if (!err) 224 - BT_INFO("HCIATH3K protocol initialized"); 225 - else 226 - BT_ERR("HCIATH3K protocol registration failed"); 227 - 228 - return err; 221 + return hci_uart_register_proto(&athp); 229 222 } 230 223 231 224 int __exit ath_deinit(void)
+1 -8
drivers/bluetooth/hci_bcsp.c
··· 748 748 749 749 int __init bcsp_init(void) 750 750 { 751 - int err = hci_uart_register_proto(&bcsp); 752 - 753 - if (!err) 754 - BT_INFO("HCI BCSP protocol initialized"); 755 - else 756 - BT_ERR("HCI BCSP protocol registration failed"); 757 - 758 - return err; 751 + return hci_uart_register_proto(&bcsp); 759 752 } 760 753 761 754 int __exit bcsp_deinit(void)
+1 -8
drivers/bluetooth/hci_h4.c
··· 152 152 153 153 int __init h4_init(void) 154 154 { 155 - int err = hci_uart_register_proto(&h4p); 156 - 157 - if (!err) 158 - BT_INFO("HCI H4 protocol initialized"); 159 - else 160 - BT_ERR("HCI H4 protocol registration failed"); 161 - 162 - return err; 155 + return hci_uart_register_proto(&h4p); 163 156 } 164 157 165 158 int __exit h4_deinit(void)
+1 -8
drivers/bluetooth/hci_h5.c
··· 756 756 757 757 int __init h5_init(void) 758 758 { 759 - int err = hci_uart_register_proto(&h5p); 760 - 761 - if (!err) 762 - BT_INFO("HCI Three-wire UART (H5) protocol initialized"); 763 - else 764 - BT_ERR("HCI Three-wire UART (H5) protocol init failed"); 765 - 766 - return err; 759 + return hci_uart_register_proto(&h5p); 767 760 } 768 761 769 762 int __exit h5_deinit(void)
+2
drivers/bluetooth/hci_ldisc.c
··· 60 60 61 61 hup[p->id] = p; 62 62 63 + BT_INFO("HCI UART protocol %s registered", p->name); 64 + 63 65 return 0; 64 66 } 65 67
+1 -8
drivers/bluetooth/hci_ll.c
··· 518 518 519 519 int __init ll_init(void) 520 520 { 521 - int err = hci_uart_register_proto(&llp); 522 - 523 - if (!err) 524 - BT_INFO("HCILL protocol initialized"); 525 - else 526 - BT_ERR("HCILL protocol registration failed"); 527 - 528 - return err; 521 + return hci_uart_register_proto(&llp); 529 522 } 530 523 531 524 int __exit ll_deinit(void)