diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-03-31 19:17:41 (GMT) |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-04-07 21:06:25 (GMT) |
commit | baa7e1fa6d2870462bd744df1c6ddbd497fe86d6 (patch) | |
tree | 44b459ce553a586e2fc8e43ba19d1e9a99a339da /include | |
parent | 48454079c2d4b9ee65c570a22c5fdfe1827996a4 (diff) | |
download | linux-fsl-qoriq-baa7e1fa6d2870462bd744df1c6ddbd497fe86d6.tar.xz |
Bluetooth: Use struct list_head for L2CAP channels list
Use a well known Kernel API is always a good idea than implement your own
list.
In the future we might use RCU on this list.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 6378bcc..ddf4bc5 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -277,16 +277,9 @@ struct l2cap_conn_param_update_rsp { #define L2CAP_CONN_PARAM_REJECTED 0x0001 /* ----- L2CAP channels and connections ----- */ - struct l2cap_chan { struct sock *sk; - struct l2cap_chan *next_c; - struct l2cap_chan *prev_c; -}; - -struct l2cap_chan_list { - struct l2cap_chan *head; - rwlock_t lock; + struct list_head list; }; struct l2cap_conn { @@ -312,7 +305,8 @@ struct l2cap_conn { __u8 disc_reason; - struct l2cap_chan_list chan_list; + struct list_head chan_l; + rwlock_t chan_lock; }; struct sock_del_list { |