summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-08-31 16:39:28 +0300
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-09-08 16:53:48 -0300
commit6b536b5e5e1da32f3ba1e3f42c7bf2f80d37dc6b (patch)
tree3ee798ccf9f41e54a8fd35c30fc63d8388f80f1d
parent7923296f3f9eebbe3d7bb4c99d73bd7a226e0146 (diff)
downloadop-kernel-dev-6b536b5e5e1da32f3ba1e3f42c7bf2f80d37dc6b.zip
op-kernel-dev-6b536b5e5e1da32f3ba1e3f42c7bf2f80d37dc6b.tar.gz
Bluetooth: Remove unneeded zero init
hdev is allocated with kzalloc so zero initialization is not needed. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r--include/net/bluetooth/hci_core.h9
-rw-r--r--net/bluetooth/hci_core.c2
2 files changed, 1 insertions, 10 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 1bbc109..fa807a3 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -428,15 +428,6 @@ static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
test_bit(HCI_CONN_SSP_ENABLED, &conn->flags);
}
-static inline void hci_conn_hash_init(struct hci_dev *hdev)
-{
- struct hci_conn_hash *h = &hdev->conn_hash;
- INIT_LIST_HEAD(&h->list);
- h->acl_num = 0;
- h->sco_num = 0;
- h->le_num = 0;
-}
-
static inline void hci_conn_hash_add(struct hci_dev *hdev, struct hci_conn *c)
{
struct hci_conn_hash *h = &hdev->conn_hash;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index fa974a1..86abe72 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1652,6 +1652,7 @@ struct hci_dev *hci_alloc_dev(void)
INIT_LIST_HEAD(&hdev->link_keys);
INIT_LIST_HEAD(&hdev->long_term_keys);
INIT_LIST_HEAD(&hdev->remote_oob_data);
+ INIT_LIST_HEAD(&hdev->conn_hash.list);
INIT_WORK(&hdev->rx_work, hci_rx_work);
INIT_WORK(&hdev->cmd_work, hci_cmd_work);
@@ -1674,7 +1675,6 @@ struct hci_dev *hci_alloc_dev(void)
hci_init_sysfs(hdev);
discovery_init(hdev);
- hci_conn_hash_init(hdev);
return hdev;
}
OpenPOWER on IntegriCloud