diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-12-05 11:45:21 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-12-05 12:12:58 +0100 |
commit | 0256325ed666af8346c89deb9d437c2209f463cb (patch) | |
tree | 57c63cb418cf1470b07420326d3d5583e99cd34a /net/bluetooth | |
parent | Bluetooth: Add support for Start Service Discovery command (diff) | |
download | linux-0256325ed666af8346c89deb9d437c2209f463cb.tar.xz linux-0256325ed666af8346c89deb9d437c2209f463cb.zip |
Bluetooth: Add helper function for clearing the discovery filter
The discovery filter allocates memory for its UUID list. So use
a helper function to free it and reset it to default states.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 42f86dc3fb40..3c81b5cdda83 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2061,10 +2061,7 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state) * count, it is important to actually free the allocated * list of UUIDs here. */ - hdev->discovery.rssi = HCI_RSSI_INVALID; - hdev->discovery.uuid_count = 0; - kfree(hdev->discovery.uuids); - hdev->discovery.uuids = NULL; + hci_discovery_filter_clear(hdev); if (old_state != DISCOVERY_STARTING) mgmt_discovering(hdev, 0); |