Skip to content

Commit 47c5d82

Browse files
jhovoldVudentz
authored andcommitted
Bluetooth: hci_qca: fix debugfs registration
Since commit 3e4be65 ("Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990"), the setup callback which registers the debugfs interface can be called multiple times. This specifically leads to the following error when powering on the controller: debugfs: Directory 'ibs' with parent 'hci0' already present! Add a driver flag to avoid trying to register the debugfs interface more than once. Fixes: 3e4be65 ("Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990") Cc: [email protected] # 4.20 Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent fe2ccc6 commit 47c5d82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/bluetooth/hci_qca.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ enum qca_flags {
7878
QCA_HW_ERROR_EVENT,
7979
QCA_SSR_TRIGGERED,
8080
QCA_BT_OFF,
81-
QCA_ROM_FW
81+
QCA_ROM_FW,
82+
QCA_DEBUGFS_CREATED,
8283
};
8384

8485
enum qca_capabilities {
@@ -635,6 +636,9 @@ static void qca_debugfs_init(struct hci_dev *hdev)
635636
if (!hdev->debugfs)
636637
return;
637638

639+
if (test_and_set_bit(QCA_DEBUGFS_CREATED, &qca->flags))
640+
return;
641+
638642
ibs_dir = debugfs_create_dir("ibs", hdev->debugfs);
639643

640644
/* read only */

0 commit comments

Comments
 (0)