diff mbox series

[BlueZ,2/3] bap: Do not set adapter as bt_bap user_data

Message ID 20250220085811.5033-3-iulia.tanasescu@nxp.com (mailing list archive)
State Accepted
Commit cfb233b4c6b3020627014a4fffbfe16e2db8e891
Headers show
Series bap: Update bt_bap user data handling | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

Iulia Tanasescu Feb. 20, 2025, 8:58 a.m. UTC
In case of a BAP Broadcast Source session, it is not necessary to set the
adapter as bt_bap user data. Plus, setting it makes it confusing for
plugins to know the type of pointer to parse, distinguishing between
Broadcast Source sessions and other types of sessions that hold a service
reference as user data.

For a BAP Broadcast Source, the bt_bap user data can remain unset, since
the session is not associated with any remote device/service.
---
 profiles/audio/bap.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 6d2afa2c0..b36e45ea4 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -3280,7 +3280,6 @@  static int bap_adapter_probe(struct btd_profile *p, struct btd_adapter *adapter)
 	data->pac_id = bt_bap_pac_register(data->bap, pac_added_broadcast,
 					pac_removed_broadcast, data, NULL);
 
-	bt_bap_set_user_data(data->bap, adapter);
 	bap_data_set_user_data(data, adapter);
 
 	data->adapter = adapter;