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

Bluetooth: hci_uart: Add name information to hci_uart_proto struct

This adds an extra name field to the hci_uart_proto struct that provides
a simple way of adding a string identifier to the protocol.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

+13 -7
+8 -7
drivers/bluetooth/hci_ath.c
··· 206 206 } 207 207 208 208 static const struct hci_uart_proto athp = { 209 - .id = HCI_UART_ATH3K, 210 - .open = ath_open, 211 - .close = ath_close, 212 - .recv = ath_recv, 213 - .enqueue = ath_enqueue, 214 - .dequeue = ath_dequeue, 215 - .flush = ath_flush, 209 + .id = HCI_UART_ATH3K, 210 + .name = "ATH3K", 211 + .open = ath_open, 212 + .close = ath_close, 213 + .recv = ath_recv, 214 + .enqueue = ath_enqueue, 215 + .dequeue = ath_dequeue, 216 + .flush = ath_flush, 216 217 }; 217 218 218 219 int __init ath_init(void)
+1
drivers/bluetooth/hci_bcsp.c
··· 737 737 738 738 static const struct hci_uart_proto bcsp = { 739 739 .id = HCI_UART_BCSP, 740 + .name = "BCSP", 740 741 .open = bcsp_open, 741 742 .close = bcsp_close, 742 743 .enqueue = bcsp_enqueue,
+1
drivers/bluetooth/hci_h4.c
··· 141 141 142 142 static const struct hci_uart_proto h4p = { 143 143 .id = HCI_UART_H4, 144 + .name = "H4", 144 145 .open = h4_open, 145 146 .close = h4_close, 146 147 .recv = h4_recv,
+1
drivers/bluetooth/hci_h5.c
··· 745 745 746 746 static const struct hci_uart_proto h5p = { 747 747 .id = HCI_UART_3WIRE, 748 + .name = "Three-wire (H5)", 748 749 .open = h5_open, 749 750 .close = h5_close, 750 751 .recv = h5_recv,
+1
drivers/bluetooth/hci_ll.c
··· 507 507 508 508 static const struct hci_uart_proto llp = { 509 509 .id = HCI_UART_LL, 510 + .name = "LL", 510 511 .open = ll_open, 511 512 .close = ll_close, 512 513 .recv = ll_recv,
+1
drivers/bluetooth/hci_uart.h
··· 57 57 58 58 struct hci_uart_proto { 59 59 unsigned int id; 60 + const char *name; 60 61 int (*open)(struct hci_uart *hu); 61 62 int (*close)(struct hci_uart *hu); 62 63 int (*flush)(struct hci_uart *hu);