summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-04-04 20:59:40 -0700
committerMarcel Holtmann <marcel@holtmann.org>2015-04-07 18:47:09 +0200
commit5c7d2dd2852c7cd8f07cf91291b351c01b781044 (patch)
tree6539a1910d4dee4ab5abbdc142be313783c2cdf8 /net/bluetooth
parent940cbe3a6b2282551e2e458d307967ae37cbba18 (diff)
Bluetooth: Make data pointer of hci_recv_stream_fragment const
The data pointer provided to hci_recv_stream_fragment function should have been marked const. The function has no business in modifying the original data. So fix this now. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 46b114c0140b..c9e7cafb245a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3320,7 +3320,7 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb)
}
EXPORT_SYMBOL(hci_recv_frame);
-static int hci_reassembly(struct hci_dev *hdev, int type, void *data,
+static int hci_reassembly(struct hci_dev *hdev, int type, const void *data,
int count, __u8 index)
{
int len = 0;
@@ -3430,7 +3430,7 @@ static int hci_reassembly(struct hci_dev *hdev, int type, void *data,
#define STREAM_REASSEMBLY 0
-int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count)
+int hci_recv_stream_fragment(struct hci_dev *hdev, const void *data, int count)
{
int type;
int rem = 0;
@@ -3439,7 +3439,7 @@ int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count)
struct sk_buff *skb = hdev->reassembly[STREAM_REASSEMBLY];
if (!skb) {
- struct { char type; } *pkt;
+ const struct { char type; } *pkt;
/* Start of the frame */
pkt = data;