diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-04-05 07:11:43 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-04-07 18:47:10 +0200 |
commit | 4ee7ef19894c0ac35cc6dc374d65658a26d7496a (patch) | |
tree | 433bc1e398bae66dba47afc0f8b98f71915b32b1 /drivers/bluetooth/hci_ldisc.c | |
parent | Bluetooth: Remove hci_recv_stream_fragment function (diff) | |
download | linux-4ee7ef19894c0ac35cc6dc374d65658a26d7496a.tar.xz linux-4ee7ef19894c0ac35cc6dc374d65658a26d7496a.zip |
Bluetooth: hci_uart: Make struct hci_uart_proto always const
The usage of struct hci_uart_proto should always be const. Change the
function headers and individual protocol drivers.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/hci_ldisc.c')
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 50dbaf3579ed..ba3b988ce60a 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -48,9 +48,9 @@ #define VERSION "2.2" -static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO]; +static const struct hci_uart_proto *hup[HCI_UART_MAX_PROTO]; -int hci_uart_register_proto(struct hci_uart_proto *p) +int hci_uart_register_proto(const struct hci_uart_proto *p) { if (p->id >= HCI_UART_MAX_PROTO) return -EINVAL; @@ -63,7 +63,7 @@ int hci_uart_register_proto(struct hci_uart_proto *p) return 0; } -int hci_uart_unregister_proto(struct hci_uart_proto *p) +int hci_uart_unregister_proto(const struct hci_uart_proto *p) { if (p->id >= HCI_UART_MAX_PROTO) return -EINVAL; @@ -76,7 +76,7 @@ int hci_uart_unregister_proto(struct hci_uart_proto *p) return 0; } -static struct hci_uart_proto *hci_uart_get_proto(unsigned int id) +static const struct hci_uart_proto *hci_uart_get_proto(unsigned int id) { if (id >= HCI_UART_MAX_PROTO) return NULL; @@ -506,7 +506,7 @@ static int hci_uart_register_dev(struct hci_uart *hu) static int hci_uart_set_proto(struct hci_uart *hu, int id) { - struct hci_uart_proto *p; + const struct hci_uart_proto *p; int err; p = hci_uart_get_proto(id); |