diff options
author | Andrey Skvortsov <andrej.skvortzov@gmail.com> | 2024-02-24 00:37:03 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-03-07 01:26:21 +0300 |
commit | 7a6d793e9ca8bc0c1d2f0aa0a02ec380d1124c74 (patch) | |
tree | 1134f78381f07aac09d0a63245ea6ccb3e86f17e /drivers/bluetooth/hci_uart.h | |
parent | 2615fd9a7c2507eb3be3fbe49dcec88a2f56454a (diff) | |
download | linux-7a6d793e9ca8bc0c1d2f0aa0a02ec380d1124c74.tar.xz |
Bluetooth: hci_h5: Add ability to allocate memory for private data
In some cases uart-base drivers may need to use priv data. For
example, to store information needed for devcoredump.
Fixes: 044014ce85a1 ("Bluetooth: btrtl: Add Realtek devcoredump support")
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers/bluetooth/hci_uart.h')
-rw-r--r-- | drivers/bluetooth/hci_uart.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h index fb4a2d0d8cc8..68c8c7e95d64 100644 --- a/drivers/bluetooth/hci_uart.h +++ b/drivers/bluetooth/hci_uart.h @@ -97,7 +97,17 @@ struct hci_uart { int hci_uart_register_proto(const struct hci_uart_proto *p); int hci_uart_unregister_proto(const struct hci_uart_proto *p); -int hci_uart_register_device(struct hci_uart *hu, const struct hci_uart_proto *p); + +int hci_uart_register_device_priv(struct hci_uart *hu, + const struct hci_uart_proto *p, + int sizeof_priv); + +static inline int hci_uart_register_device(struct hci_uart *hu, + const struct hci_uart_proto *p) +{ + return hci_uart_register_device_priv(hu, p, 0); +} + void hci_uart_unregister_device(struct hci_uart *hu); int hci_uart_tx_wakeup(struct hci_uart *hu); |