diff mbox series

[BlueZ] input/hog-lib: avoid scanning characteristics too early

Message ID 20210407223418.28793-1-sonnysasaka@chromium.org (mailing list archive)
State Accepted
Delegated to: Luiz Von Dentz
Headers show
Series [BlueZ] input/hog-lib: avoid scanning characteristics too early | expand

Commit Message

Sonny Sasaka April 7, 2021, 10:34 p.m. UTC
From: Dmitry Torokhov <dtor@chromium.org>

We need to have active connection to fully discover a HOG instance,
and in the chain

	bt_hog_new()->
		gatt_db_foreach_service()->
		foreach_hog_service()->
		hog_attach_instance()

we have not set up hog->attrib yet. So let's skip calling
foreach_hog_chrc() from hog_attach_instance(), especially since
we will be calling bt_hog_attach() pretty much immediately after
bt_hog_new(), and we will be discovering characteristics there anyway.

---
 profiles/input/hog-lib.c | 1 -
 1 file changed, 1 deletion(-)

Comments

bluez.test.bot@gmail.com April 7, 2021, 11:03 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=462831

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - FAIL
Output:
input/hog-lib: avoid scanning characteristics too early
6: B3 Line contains hard tab characters (\t): "	bt_hog_new()->"
7: B3 Line contains hard tab characters (\t): "		gatt_db_foreach_service()->"
8: B3 Line contains hard tab characters (\t): "		foreach_hog_service()->"
9: B3 Line contains hard tab characters (\t): "		hog_attach_instance()"


##############################
Test: CheckBuild: Setup ELL - PASS

##############################
Test: CheckBuild: Setup - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS

##############################
Test: CheckBuild w/external ell - PASS



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index 6ac14e401..a9ecabad0 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -1428,7 +1428,6 @@  static void hog_attach_instance(struct bt_hog *hog,
 
 	if (!hog->attr) {
 		hog->attr = attr;
-		gatt_db_service_foreach_char(hog->attr, foreach_hog_chrc, hog);
 		return;
 	}