Merge "Bluetooth: Send power off notification earlier in the device close process" into msm-3.0

This commit is contained in:
Linux Build Service Account
2011-12-23 02:36:17 -08:00
committed by QuIC Gerrit Code Review

View File

@@ -639,6 +639,12 @@ static int hci_dev_do_close(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_DOWN); 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) if (hdev->flush)
hdev->flush(hdev); hdev->flush(hdev);
@@ -671,12 +677,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
* and no tasks are scheduled. */ * and no tasks are scheduled. */
hdev->close(hdev); 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 */ /* Clear only non-persistent flags */
if (test_bit(HCI_MGMT, &hdev->flags)) if (test_bit(HCI_MGMT, &hdev->flags))
set_bit(HCI_MGMT, &keepflags); set_bit(HCI_MGMT, &keepflags);