All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com,
	andrei.istodorescu@nxp.com, luiz.dentz@gmail.com,
	Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: [PATCH BlueZ 2/3] bap: Do not set adapter as bt_bap user_data
Date: Thu, 20 Feb 2025 10:58:10 +0200	[thread overview]
Message-ID: <20250220085811.5033-3-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20250220085811.5033-1-iulia.tanasescu@nxp.com>

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 --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;
-- 
2.43.0


  parent reply	other threads:[~2025-02-20  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20  8:58 [PATCH BlueZ 0/3] bap: Update bt_bap user data handling Iulia Tanasescu
2025-02-20  8:58 ` [PATCH BlueZ 1/3] bap: Do not clear user_data before detaching bt_bap Iulia Tanasescu
2025-02-20 10:11   ` bap: Update bt_bap user data handling bluez.test.bot
2025-02-20  8:58 ` Iulia Tanasescu [this message]
2025-02-20  8:58 ` [PATCH BlueZ 3/3] bass: Add checks for bap user data Iulia Tanasescu
2025-02-21 16:50 ` [PATCH BlueZ 0/3] bap: Update bt_bap user data handling patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250220085811.5033-3-iulia.tanasescu@nxp.com \
    --to=iulia.tanasescu@nxp.com \
    --cc=andrei.istodorescu@nxp.com \
    --cc=claudia.rosu@nxp.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mihai-octavian.urzica@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.