From: Johan Hedberg Date: Wed, 22 Feb 2012 20:01:41 +0000 (+0200) Subject: Bluetooth: Fix clearing of dev_class when powering down X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09b3c3fbbee9aef8ac5d9148ae61aae35766b2a6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Bluetooth: Fix clearing of dev_class when powering down We should assume a value of 0 for the device class when powered off. The appropriate place to do this is in hci_dev_do_close(). Signed-off-by: Johan Hedberg Acked-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 2d75ffb42f7d..2ab78bfc108e 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -795,6 +795,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) hdev->flags = 0; memset(hdev->eir, 0, sizeof(hdev->eir)); + memset(hdev->dev_class, 0, sizeof(hdev->dev_class)); hci_req_unlock(hdev);