summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_qca.c
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-15 08:51:49 +0300
committerMarcel Holtmann <marcel@holtmann.org>2019-09-05 18:27:21 +0300
commit2edc9c5cca7ac87e99c0eddf398ddcf92c4b36de (patch)
tree8bfc5209d9824a384608e2ac832f465c39f01976 /drivers/bluetooth/hci_qca.c
parent569428dabc3e2523ca2b357e7d86412df1dd1e6a (diff)
downloadlinux-2edc9c5cca7ac87e99c0eddf398ddcf92c4b36de.tar.xz
Bluetooth: hci_qca: Make structure qca_proto constant
Static structure qca_proto, of type hci_uart_proto, is used four times: as the last argument in function hci_uart_register_device(), and as the only argument to functions hci_uart_register_proto() and hci_uart_unregister_proto(). In all three of these functions, the parameter corresponding to qca_proto is declared as constant. Therefore, make qca_proto itself constant as well in order to protect it from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_qca.c')
-rw-r--r--drivers/bluetooth/hci_qca.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index f4142d195e03..0cf532071664 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1307,7 +1307,7 @@ static int qca_setup(struct hci_uart *hu)
return ret;
}
-static struct hci_uart_proto qca_proto = {
+static const struct hci_uart_proto qca_proto = {
.id = HCI_UART_QCA,
.name = "QCA",
.manufacturer = 29,