diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-05-26 01:46:41 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-08-11 20:36:50 +0200 |
commit | 6bfa273e533d7b25eee3d74e28a7fe8e6a8e7a93 (patch) | |
tree | ff166fbbd3010d9691fca37f979c2f2634cf270e /net/bluetooth/iso.c | |
parent | Bluetooth: btrtl: Correct the length of the HCI command for drop fw (diff) | |
download | linux-6bfa273e533d7b25eee3d74e28a7fe8e6a8e7a93.tar.xz linux-6bfa273e533d7b25eee3d74e28a7fe8e6a8e7a93.zip |
Bluetooth: Consolidate code around sk_alloc into a helper function
This consolidates code around sk_alloc into bt_sock_alloc which does
take care of common initialization.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/iso.c')
-rw-r--r-- | net/bluetooth/iso.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index 5db4d68c96d5..84d238d0639a 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -738,21 +738,13 @@ static struct sock *iso_sock_alloc(struct net *net, struct socket *sock, { struct sock *sk; - sk = sk_alloc(net, PF_BLUETOOTH, prio, &iso_proto, kern); + sk = bt_sock_alloc(net, sock, &iso_proto, proto, prio, kern); if (!sk) return NULL; - sock_init_data(sock, sk); - INIT_LIST_HEAD(&bt_sk(sk)->accept_q); - sk->sk_destruct = iso_sock_destruct; sk->sk_sndtimeo = ISO_CONN_TIMEOUT; - sock_reset_flag(sk, SOCK_ZAPPED); - - sk->sk_protocol = proto; - sk->sk_state = BT_OPEN; - /* Set address type as public as default src address is BDADDR_ANY */ iso_pi(sk)->src_type = BDADDR_LE_PUBLIC; |