diff options
Diffstat (limited to 'net/bluetooth/rfcomm/core.c')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 38b618c96de6..3d35eba6d0cb 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -377,13 +377,11 @@ static void rfcomm_dlc_unlink(struct rfcomm_dlc *d) | |||
377 | static struct rfcomm_dlc *rfcomm_dlc_get(struct rfcomm_session *s, u8 dlci) | 377 | static struct rfcomm_dlc *rfcomm_dlc_get(struct rfcomm_session *s, u8 dlci) |
378 | { | 378 | { |
379 | struct rfcomm_dlc *d; | 379 | struct rfcomm_dlc *d; |
380 | struct list_head *p; | ||
381 | 380 | ||
382 | list_for_each(p, &s->dlcs) { | 381 | list_for_each_entry(d, &s->dlcs, list) |
383 | d = list_entry(p, struct rfcomm_dlc, list); | ||
384 | if (d->dlci == dlci) | 382 | if (d->dlci == dlci) |
385 | return d; | 383 | return d; |
386 | } | 384 | |
387 | return NULL; | 385 | return NULL; |
388 | } | 386 | } |
389 | 387 | ||
@@ -2115,15 +2113,13 @@ static struct hci_cb rfcomm_cb = { | |||
2115 | static int rfcomm_dlc_debugfs_show(struct seq_file *f, void *x) | 2113 | static int rfcomm_dlc_debugfs_show(struct seq_file *f, void *x) |
2116 | { | 2114 | { |
2117 | struct rfcomm_session *s; | 2115 | struct rfcomm_session *s; |
2118 | struct list_head *pp, *p; | ||
2119 | 2116 | ||
2120 | rfcomm_lock(); | 2117 | rfcomm_lock(); |
2121 | 2118 | ||
2122 | list_for_each(p, &session_list) { | 2119 | list_for_each_entry(s, &session_list, list) { |
2123 | s = list_entry(p, struct rfcomm_session, list); | 2120 | struct rfcomm_dlc *d; |
2124 | list_for_each(pp, &s->dlcs) { | 2121 | list_for_each_entry(d, &s->dlcs, list) { |
2125 | struct sock *sk = s->sock->sk; | 2122 | struct sock *sk = s->sock->sk; |
2126 | struct rfcomm_dlc *d = list_entry(pp, struct rfcomm_dlc, list); | ||
2127 | 2123 | ||
2128 | seq_printf(f, "%s %s %ld %d %d %d %d\n", | 2124 | seq_printf(f, "%s %s %ld %d %d %d %d\n", |
2129 | batostr(&bt_sk(sk)->src), | 2125 | batostr(&bt_sk(sk)->src), |