Bluetooth: CSIS: Remove conn from bt_csis_client_lock_changed_cb
The connection pointer can be inferred based on the set pointer, by using e.g. CONTAINER_OF. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
fa1be6436a
commit
061fb633a5
3 changed files with 3 additions and 6 deletions
|
@ -242,14 +242,12 @@ typedef void (*bt_csis_client_lock_set_cb)(int err);
|
|||
/**
|
||||
* @brief Callback when the lock value on a set of a connected device changes.
|
||||
*
|
||||
* @param conn Connection of the CSIS server.
|
||||
* @param set The set that was changed.
|
||||
* @param locked Whether the lock is locked or release.
|
||||
*
|
||||
* @return int Return 0 on success, or an errno value on error.
|
||||
*/
|
||||
typedef void (*bt_csis_client_lock_changed_cb)(struct bt_conn *conn,
|
||||
struct bt_csis_client_set *set,
|
||||
typedef void (*bt_csis_client_lock_changed_cb)(struct bt_csis_client_set *set,
|
||||
bool locked);
|
||||
|
||||
/**
|
||||
|
|
|
@ -321,7 +321,7 @@ static uint8_t lock_notify_func(struct bt_conn *conn,
|
|||
client = &client_insts[bt_conn_index(conn)];
|
||||
set = &client->set_member->sets[csis_inst->cli.idx];
|
||||
|
||||
csis_client_cbs->lock_changed(conn, set, locked);
|
||||
csis_client_cbs->lock_changed(set, locked);
|
||||
}
|
||||
} else {
|
||||
BT_DBG("Invalid length %u", length);
|
||||
|
|
|
@ -75,8 +75,7 @@ static void csis_discover_cb(struct bt_csis_client_set_member *member, int err,
|
|||
discovered = true;
|
||||
}
|
||||
|
||||
static void csis_lock_changed_cb(struct bt_conn *conn,
|
||||
struct bt_csis_client_set *set,
|
||||
static void csis_lock_changed_cb(struct bt_csis_client_set *set,
|
||||
bool locked)
|
||||
{
|
||||
printk("Set %p %s\n", set, locked ? "locked" : "released");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue