diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-11-12 00:02:16 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-04 12:28:25 -0400 |
commit | 5afff03815e26abf34702ec10422535224cdfe38 (patch) | |
tree | 98d2a696ba11a7d3d15c5d227b98703eb77de7c3 /net/bluetooth | |
parent | 936009976497e1e123f3223bedca25312ee20f08 (diff) |
Bluetooth: Remove driver init queue from core
The driver init queue is no longer needed. This can be all handled
inside the drivers now. So remove it.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 0f00b8bc279f..9570358adb77 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -316,29 +316,9 @@ static void amp_init(struct hci_request *req) | |||
316 | static void hci_init1_req(struct hci_request *req, unsigned long opt) | 316 | static void hci_init1_req(struct hci_request *req, unsigned long opt) |
317 | { | 317 | { |
318 | struct hci_dev *hdev = req->hdev; | 318 | struct hci_dev *hdev = req->hdev; |
319 | struct hci_request init_req; | ||
320 | struct sk_buff *skb; | ||
321 | 319 | ||
322 | BT_DBG("%s %ld", hdev->name, opt); | 320 | BT_DBG("%s %ld", hdev->name, opt); |
323 | 321 | ||
324 | /* Driver initialization */ | ||
325 | |||
326 | hci_req_init(&init_req, hdev); | ||
327 | |||
328 | /* Special commands */ | ||
329 | while ((skb = skb_dequeue(&hdev->driver_init))) { | ||
330 | bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; | ||
331 | skb->dev = (void *) hdev; | ||
332 | |||
333 | if (skb_queue_empty(&init_req.cmd_q)) | ||
334 | bt_cb(skb)->req.start = true; | ||
335 | |||
336 | skb_queue_tail(&init_req.cmd_q, skb); | ||
337 | } | ||
338 | skb_queue_purge(&hdev->driver_init); | ||
339 | |||
340 | hci_req_run(&init_req, NULL); | ||
341 | |||
342 | /* Reset */ | 322 | /* Reset */ |
343 | if (!test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks)) | 323 | if (!test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks)) |
344 | hci_reset_req(req, 0); | 324 | hci_reset_req(req, 0); |
@@ -2144,7 +2124,6 @@ struct hci_dev *hci_alloc_dev(void) | |||
2144 | INIT_DELAYED_WORK(&hdev->discov_off, hci_discov_off); | 2124 | INIT_DELAYED_WORK(&hdev->discov_off, hci_discov_off); |
2145 | INIT_DELAYED_WORK(&hdev->le_scan_disable, le_scan_disable_work); | 2125 | INIT_DELAYED_WORK(&hdev->le_scan_disable, le_scan_disable_work); |
2146 | 2126 | ||
2147 | skb_queue_head_init(&hdev->driver_init); | ||
2148 | skb_queue_head_init(&hdev->rx_q); | 2127 | skb_queue_head_init(&hdev->rx_q); |
2149 | skb_queue_head_init(&hdev->cmd_q); | 2128 | skb_queue_head_init(&hdev->cmd_q); |
2150 | skb_queue_head_init(&hdev->raw_q); | 2129 | skb_queue_head_init(&hdev->raw_q); |
@@ -2163,8 +2142,6 @@ EXPORT_SYMBOL(hci_alloc_dev); | |||
2163 | /* Free HCI device */ | 2142 | /* Free HCI device */ |
2164 | void hci_free_dev(struct hci_dev *hdev) | 2143 | void hci_free_dev(struct hci_dev *hdev) |
2165 | { | 2144 | { |
2166 | skb_queue_purge(&hdev->driver_init); | ||
2167 | |||
2168 | /* will free via device release */ | 2145 | /* will free via device release */ |
2169 | put_device(&hdev->dev); | 2146 | put_device(&hdev->dev); |
2170 | } | 2147 | } |