Bluetooth: btusb: Move Broadcom quirk setting into support module
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 6 Apr 2015 05:52:15 +0000 (22:52 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Apr 2015 16:47:11 +0000 (18:47 +0200)
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>
drivers/bluetooth/btbcm.c
drivers/bluetooth/btusb.c

index 17565ab610f4e3ed9d7ec9fb750177a9bc728d00..c90401261ab4a9f3b1ad4486bd392cd2df6dd20e 100644 (file)
@@ -327,6 +327,8 @@ reset:
 
        btbcm_check_bdaddr(hdev);
 
+       set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
+
 done:
        release_firmware(fw);
 
@@ -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);
index 53275c55c782b9c4347460f6562f3a835f659496..ea7c726adcb1274dfb08cdc9de025c9b3f99c1a2 100644 (file)
@@ -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) {