summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-05-15 14:01:28 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-05-15 14:01:28 -0700
commit2fa20fe9fc4a9e986667d35d3cb2b40d89c9ad9b (patch)
treece08cefff41bbc5d00e1e57f83bee4d884cf95e1
parent62cbb2a9f57dc2b4ebeb33e5f8fb9841c3f32f96 (diff)
downloadbluez-2fa20fe9fc4a9e986667d35d3cb2b40d89c9ad9b.tar.gz
vcp: Mark driver as experimental
This uses the btd_profile.experimental to mark the driver as experimental.
-rw-r--r--profiles/audio/vcp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/profiles/audio/vcp.c b/profiles/audio/vcp.c
index b42b0a4f7..175275f2e 100644
--- a/profiles/audio/vcp.c
+++ b/profiles/audio/vcp.c
@@ -289,18 +289,20 @@ static struct btd_profile vcp_profile = {
.adapter_probe = vcp_server_probe,
.adapter_remove = vcp_server_remove,
+
+ .experimental = true,
};
static unsigned int vcp_id = 0;
static int vcp_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(&vcp_profile);
+ if (err)
+ return err;
- btd_profile_register(&vcp_profile);
vcp_id = bt_vcp_register(vcp_attached, vcp_detached, NULL);
return 0;
@@ -308,10 +310,8 @@ static int vcp_init(void)
static void vcp_exit(void)
{
- if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
- btd_profile_unregister(&vcp_profile);
- bt_vcp_unregister(vcp_id);
- }
+ btd_profile_unregister(&vcp_profile);
+ bt_vcp_unregister(vcp_id);
}
BLUETOOTH_PLUGIN_DEFINE(vcp, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,