summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-12-15 01:52:31 +0100
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-16 21:16:15 +0100
commit3e9c40a6f72a4ee7a978204cac00f91ad08bbe9b (patch)
tree8a741f40db1e086d3fc7cc3f7cc6368b874d9d71 /net
parentBluetooth: Use chan instead of l2cap_pi macro (diff)
downloadlinux-3e9c40a6f72a4ee7a978204cac00f91ad08bbe9b.tar.xz
linux-3e9c40a6f72a4ee7a978204cac00f91ad08bbe9b.zip
Bluetooth: Use list_for_each_entry in hci_conn_hash_flush()
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_conn.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 1a076941829b..dfe807fb7e79 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -807,17 +807,11 @@ void hci_conn_enter_sniff_mode(struct hci_conn *conn)
void hci_conn_hash_flush(struct hci_dev *hdev)
{
struct hci_conn_hash *h = &hdev->conn_hash;
- struct list_head *p;
+ struct hci_conn *c;
BT_DBG("hdev %s", hdev->name);
- p = h->list.next;
- while (p != &h->list) {
- struct hci_conn *c;
-
- c = list_entry(p, struct hci_conn, list);
- p = p->next;
-
+ list_for_each_entry(c, &h->list, list) {
c->state = BT_CLOSED;
hci_proto_disconn_cfm(c, HCI_ERROR_LOCAL_HOST_TERM);