Skip to content

Commit

Permalink
Bluetooth: Fix clearing of dev_class when powering down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hedberg committed Feb 23, 2012
1 parent 27fcc36 commit 09b3c3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 09b3c3f

Please sign in to comment.