Bluetooth: btbcm: Move setting of USE_BDADDR_PROPERTY quirk to hci_bcm.c
authorHans de Goede <hdegoede@redhat.com>
Fri, 17 Apr 2020 17:15:26 +0000 (19:15 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 22 Apr 2020 17:43:58 +0000 (19:43 +0200)
btbcm_finalize() is currently only used by UART attached BCM devices.

Move the setting of the USE_BDADDR_PROPERTY quirk, which we only want
for UART attached devices to hci_bcm in preparation for using
btbcm_finalize() for USB attached devices too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btbcm.c
drivers/bluetooth/hci_bcm.c

index b9e1fe0521484ed2d1cab9b015c42a52615d59f4..8052a0e8dbfb28a01d39736a06dc0c331ad6ef36 100644 (file)
@@ -488,12 +488,6 @@ int btbcm_finalize(struct hci_dev *hdev)
 
        set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
 
-       /* Some devices ship with the controller default address.
-        * Allow the bootloader to set a valid address through the
-        * device tree.
-        */
-       set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
-
        return 0;
 }
 EXPORT_SYMBOL_GPL(btbcm_finalize);
index 19e4587f366cc78a3f5d7e131014a0dc7a1263c0..c42bf791a61b5a3e4fc386c3b785a1c282de545d 100644 (file)
@@ -623,6 +623,12 @@ finalize:
        if (err)
                return err;
 
+       /* Some devices ship with the controller default address.
+        * Allow the bootloader to set a valid address through the
+        * device tree.
+        */
+       set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
+
        if (!bcm_request_irq(bcm))
                err = bcm_setup_sleep(hu);