Skip to contentSkip to conversation

Bluetooth: btusb: Move Broadcom quirk setting into support module

PATCH New Marcel Holtmann 1 participant 1 message Apr 5, 2015 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 13/14 Bluetooth: btusb: Move Broadcom quirk setting into support module

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.

---
 drivers/bluetooth/btbcm.c | 4 ++++
 drivers/bluetooth/btusb.c | 5 +----
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/bluetooth/btbcm.c +4 -0
index fead228a7621..5458865c0f52 100644
@@ -325,6 +325,8 @@ reset:
 
 	btbcm_check_bdaddr(hdev);
 
+	set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
+
 done:
 	release_firmware(fw);
 
@@ -345,6 +347,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);
drivers/bluetooth/btusb.c +1 -4
index ff3b5ecbb164..b11141aa2f4f 100644
@@ -2705,13 +2705,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) {
Signature · 1 line
2.1.0