Bluetooth: Audio: Make bt_tbs_client_cb const
Add `const` for the bt_tbs_client_cb as it is a singleton that should not change over time. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
7eef8d705f
commit
a7ed7b7250
3 changed files with 4 additions and 4 deletions
|
@ -733,6 +733,6 @@ int bt_tbs_client_read_optional_opcodes(struct bt_conn *conn,
|
||||||
*
|
*
|
||||||
* @param cbs Pointer to the callback structure.
|
* @param cbs Pointer to the callback structure.
|
||||||
*/
|
*/
|
||||||
void bt_tbs_client_register_cb(struct bt_tbs_client_cb *cbs);
|
void bt_tbs_client_register_cb(const struct bt_tbs_client_cb *cbs);
|
||||||
|
|
||||||
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_TBS_H_ */
|
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_TBS_H_ */
|
||||||
|
|
|
@ -96,7 +96,7 @@ struct bt_tbs_server_inst {
|
||||||
bool subscribe_all;
|
bool subscribe_all;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct bt_tbs_client_cb *tbs_client_cbs;
|
static const struct bt_tbs_client_cb *tbs_client_cbs;
|
||||||
|
|
||||||
static struct bt_tbs_server_inst srv_insts[CONFIG_BT_MAX_CONN];
|
static struct bt_tbs_server_inst srv_insts[CONFIG_BT_MAX_CONN];
|
||||||
static const struct bt_uuid *tbs_uuid = BT_UUID_TBS;
|
static const struct bt_uuid *tbs_uuid = BT_UUID_TBS;
|
||||||
|
@ -2174,7 +2174,7 @@ int bt_tbs_client_discover(struct bt_conn *conn, bool subscribe)
|
||||||
return bt_gatt_discover(conn, &srv_inst->discover_params);
|
return bt_gatt_discover(conn, &srv_inst->discover_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bt_tbs_client_register_cb(struct bt_tbs_client_cb *cbs)
|
void bt_tbs_client_register_cb(const struct bt_tbs_client_cb *cbs)
|
||||||
{
|
{
|
||||||
tbs_client_cbs = cbs;
|
tbs_client_cbs = cbs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void tbs_client_discover_cb(struct bt_conn *conn, int err,
|
||||||
discovery_complete = true;
|
discovery_complete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct bt_tbs_client_cb tbs_client_cbs = {
|
static const struct bt_tbs_client_cb tbs_client_cbs = {
|
||||||
.discover = tbs_client_discover_cb,
|
.discover = tbs_client_discover_cb,
|
||||||
.originate_call = NULL,
|
.originate_call = NULL,
|
||||||
.terminate_call = NULL,
|
.terminate_call = NULL,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue