Merge "Bluetooth: Send power off notification earlier in the device close process" into msm-3.0
This commit is contained in:
committed by
QuIC Gerrit Code Review
commit
510503d38e
@@ -639,6 +639,12 @@ static int hci_dev_do_close(struct hci_dev *hdev)
|
||||
|
||||
hci_notify(hdev, HCI_DEV_DOWN);
|
||||
|
||||
if (hdev->dev_type == HCI_BREDR) {
|
||||
hci_dev_lock_bh(hdev);
|
||||
mgmt_powered(hdev->id, 0);
|
||||
hci_dev_unlock_bh(hdev);
|
||||
}
|
||||
|
||||
if (hdev->flush)
|
||||
hdev->flush(hdev);
|
||||
|
||||
@@ -671,12 +677,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
|
||||
* and no tasks are scheduled. */
|
||||
hdev->close(hdev);
|
||||
|
||||
if (hdev->dev_type == HCI_BREDR) {
|
||||
hci_dev_lock_bh(hdev);
|
||||
mgmt_powered(hdev->id, 0);
|
||||
hci_dev_unlock_bh(hdev);
|
||||
}
|
||||
|
||||
/* Clear only non-persistent flags */
|
||||
if (test_bit(HCI_MGMT, &hdev->flags))
|
||||
set_bit(HCI_MGMT, &keepflags);
|
||||
|
||||
Reference in New Issue
Block a user