Bluetooth: Use const for struct l2cap_ops field
The struct l2cap_ops field should not allow any modifications and thus it is better declared as const. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
b0c3e138b4
commit
67f86a45bb
|
@ -579,7 +579,7 @@ struct l2cap_chan {
|
||||||
struct list_head global_l;
|
struct list_head global_l;
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
struct l2cap_ops *ops;
|
const struct l2cap_ops *ops;
|
||||||
struct mutex lock;
|
struct mutex lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -704,7 +704,7 @@ static struct sk_buff *a2mp_chan_alloc_skb_cb(struct l2cap_chan *chan,
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct l2cap_ops a2mp_chan_ops = {
|
static const struct l2cap_ops a2mp_chan_ops = {
|
||||||
.name = "L2CAP A2MP channel",
|
.name = "L2CAP A2MP channel",
|
||||||
.recv = a2mp_chan_recv_cb,
|
.recv = a2mp_chan_recv_cb,
|
||||||
.close = a2mp_chan_close_cb,
|
.close = a2mp_chan_close_cb,
|
||||||
|
|
|
@ -1375,7 +1375,7 @@ static void l2cap_sock_suspend_cb(struct l2cap_chan *chan)
|
||||||
sk->sk_state_change(sk);
|
sk->sk_state_change(sk);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct l2cap_ops l2cap_chan_ops = {
|
static const struct l2cap_ops l2cap_chan_ops = {
|
||||||
.name = "L2CAP Socket Interface",
|
.name = "L2CAP Socket Interface",
|
||||||
.new_connection = l2cap_sock_new_connection_cb,
|
.new_connection = l2cap_sock_new_connection_cb,
|
||||||
.recv = l2cap_sock_recv_cb,
|
.recv = l2cap_sock_recv_cb,
|
||||||
|
|
Loading…
Reference in New Issue