summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-02-23 00:01:41 +0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-23 15:07:00 +0400
commit09b3c3fbbee9aef8ac5d9148ae61aae35766b2a6 (patch)
tree512ec3fe2cde99425beb218babdb42674eb6b35d /net/bluetooth
parent27fcc362297b8e838a929c947b82eabb3f4b7591 (diff)
downloadlinux-09b3c3fbbee9aef8ac5d9148ae61aae35766b2a6.tar.xz
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 <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c1
1 files changed, 1 insertions, 0 deletions
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);