linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v2 02/10] bap: Mark driver as experimental
Date: Tue, 16 May 2023 13:59:16 -0700	[thread overview]
Message-ID: <20230516205924.1040506-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20230516205924.1040506-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This uses the btd_profile.experimental to mark the driver as
experimental.
---
 profiles/audio/bap.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 8f12fc410f67..1a543a9ce99b 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1354,18 +1354,19 @@ static struct btd_profile bap_profile = {
 	.accept		= bap_accept,
 	.disconnect	= bap_disconnect,
 	.auto_connect	= true,
+	.experimental	= true,
 };
 
 static unsigned int bap_id = 0;
 
 static int bap_init(void)
 {
-	if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
-		warn("D-Bus experimental not enabled");
-		return -ENOTSUP;
-	}
+	int err;
+
+	err = btd_profile_register(&bap_profile);
+	if (err)
+		return err;
 
-	btd_profile_register(&bap_profile);
 	bap_id = bt_bap_register(bap_attached, bap_detached, NULL);
 
 	return 0;
@@ -1373,10 +1374,8 @@ static int bap_init(void)
 
 static void bap_exit(void)
 {
-	if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
-		btd_profile_unregister(&bap_profile);
-		bt_bap_unregister(bap_id);
-	}
+	btd_profile_unregister(&bap_profile);
+	bt_bap_unregister(bap_id);
 }
 
 BLUETOOTH_PLUGIN_DEFINE(bap, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
-- 
2.40.1


  reply	other threads:[~2023-05-16 20:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 20:59 [PATCH v2 01/10] profile: Add support for experimental flag Luiz Augusto von Dentz
2023-05-16 20:59 ` Luiz Augusto von Dentz [this message]
2023-05-16 20:59 ` [PATCH v2 03/10] bass: Mark driver as experimental Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 04/10] csip: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 05/10] mcp: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 06/10] vcp: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 07/10] plugin: Treat -ENOTSUP as -ENOSYS Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 08/10] adapter: Add support for experimental flag Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 09/10] admin: Mark driver as experimental Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 10/10] main: Rework config option parsing Luiz Augusto von Dentz
2023-05-17  1:33 ` [v2,01/10] profile: Add support for experimental flag bluez.test.bot
2023-05-17 19:50 ` [PATCH v2 01/10] " 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=20230516205924.1040506-2-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).