Skip to content

Commit

Permalink
Bluetooth: btusb: Move Broadcom quirk setting into support module
Browse files Browse the repository at this point in the history
The quirks for Broadcom devices can be set from the setup function and
to keep the code simple, just move them into Broadcom support module.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
holtmann committed Apr 7, 2015
1 parent c2bfb10 commit 941521e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions drivers/bluetooth/btbcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ int btbcm_setup_patchram(struct hci_dev *hdev)

btbcm_check_bdaddr(hdev);

set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);

done:
release_firmware(fw);

Expand All @@ -347,6 +349,8 @@ int btbcm_setup_apple(struct hci_dev *hdev)
get_unaligned_le16(skb->data + 5));
kfree_skb(skb);

set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);

return 0;
}
EXPORT_SYMBOL_GPL(btbcm_setup_apple);
Expand Down
5 changes: 1 addition & 4 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2799,13 +2799,10 @@ static int btusb_probe(struct usb_interface *intf,
if (id->driver_info & BTUSB_BCM_PATCHRAM) {
hdev->setup = btbcm_setup_patchram;
hdev->set_bdaddr = btbcm_set_bdaddr;
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
}

if (id->driver_info & BTUSB_BCM_APPLE) {
if (id->driver_info & BTUSB_BCM_APPLE)
hdev->setup = btbcm_setup_apple;
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
}
#endif

if (id->driver_info & BTUSB_INTEL) {
Expand Down

0 comments on commit 941521e

Please sign in to comment.