diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-09 23:54:33 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-09 23:54:33 +0400 |
commit | 312fef7d18adda2be822d31916547f84ed6af28b (patch) | |
tree | 095d936b751b0a92946fcf710fb74dea7f8f33f7 /net/bluetooth/bnep | |
parent | 5e819059a20b0fc5a71875f28b4cae359e38d85a (diff) | |
parent | 2aeabcbedd51aef94b61d05b57246d1db4984453 (diff) | |
download | linux-312fef7d18adda2be822d31916547f84ed6af28b.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next
Conflicts:
net/bluetooth/l2cap_sock.c
net/bluetooth/mgmt.c
Diffstat (limited to 'net/bluetooth/bnep')
-rw-r--r-- | net/bluetooth/bnep/core.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index 91bcd3a961ec..a6cd856046ab 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -65,15 +65,13 @@ static DECLARE_RWSEM(bnep_session_sem); static struct bnep_session *__bnep_get_session(u8 *dst) { struct bnep_session *s; - struct list_head *p; BT_DBG(""); - list_for_each(p, &bnep_session_list) { - s = list_entry(p, struct bnep_session, list); + list_for_each_entry(s, &bnep_session_list, list) if (!compare_ether_addr(dst, s->eh.h_source)) return s; - } + return NULL; } @@ -667,17 +665,14 @@ static void __bnep_copy_ci(struct bnep_conninfo *ci, struct bnep_session *s) int bnep_get_connlist(struct bnep_connlist_req *req) { - struct list_head *p; + struct bnep_session *s; int err = 0, n = 0; down_read(&bnep_session_sem); - list_for_each(p, &bnep_session_list) { - struct bnep_session *s; + list_for_each_entry(s, &bnep_session_list, list) { struct bnep_conninfo ci; - s = list_entry(p, struct bnep_session, list); - __bnep_copy_ci(&ci, s); if (copy_to_user(req->ci, &ci, sizeof(ci))) { |