summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-12-14 13:02:51 -0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-16 18:16:14 -0200
commit2c33c06a8fd2f784ca763ad150d5d63c3c49946e (patch)
treec8ccf68c9df1f1d8cdc7ef8da2a182b25f584a8a /net/bluetooth/hci_conn.c
parent5a13b09531420d230616bd524b68a5b0c23cd487 (diff)
downloadop-kernel-dev-2c33c06a8fd2f784ca763ad150d5d63c3c49946e.zip
op-kernel-dev-2c33c06a8fd2f784ca763ad150d5d63c3c49946e.tar.gz
Bluetooth: remove struct hci_chan_hash
Only the list member of the struct was used, so we now fold it into hci_conn. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index b328ac6..1a07694 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -374,7 +374,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
skb_queue_head_init(&conn->data_q);
- hci_chan_hash_init(conn);
+ INIT_LIST_HEAD(&conn->chan_list);;
setup_timer(&conn->disc_timer, hci_conn_timeout, (unsigned long)conn);
setup_timer(&conn->idle_timer, hci_conn_idle, (unsigned long)conn);
@@ -434,7 +434,7 @@ int hci_conn_del(struct hci_conn *conn)
tasklet_disable(&hdev->tx_task);
- hci_chan_hash_flush(conn);
+ hci_chan_list_flush(conn);
hci_conn_hash_del(hdev, conn);
if (hdev->notify)
@@ -970,7 +970,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn)
skb_queue_head_init(&chan->data_q);
tasklet_disable(&hdev->tx_task);
- hci_chan_hash_add(conn, chan);
+ list_add(&conn->chan_list, &chan->list);
tasklet_enable(&hdev->tx_task);
return chan;
@@ -984,7 +984,7 @@ int hci_chan_del(struct hci_chan *chan)
BT_DBG("%s conn %p chan %p", hdev->name, conn, chan);
tasklet_disable(&hdev->tx_task);
- hci_chan_hash_del(conn, chan);
+ list_del(&chan->list);
tasklet_enable(&hdev->tx_task);
skb_queue_purge(&chan->data_q);
@@ -993,13 +993,12 @@ int hci_chan_del(struct hci_chan *chan)
return 0;
}
-void hci_chan_hash_flush(struct hci_conn *conn)
+void hci_chan_list_flush(struct hci_conn *conn)
{
- struct hci_chan_hash *h = &conn->chan_hash;
struct hci_chan *chan, *tmp;
BT_DBG("conn %p", conn);
- list_for_each_entry_safe(chan, tmp, &h->list, list)
+ list_for_each_entry_safe(chan, tmp, &conn->chan_list, list)
hci_chan_del(chan);
}
OpenPOWER on IntegriCloud