drivers/nble: Remove unnecessary bt_conn_add_le function
Change-Id: I99221b0b62219d59a076e8d228c4478571714e7a Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
15b7cb6f1e
commit
9c3fc8aa96
1 changed files with 2 additions and 13 deletions
|
@ -51,17 +51,6 @@ static struct bt_conn *conn_new(void)
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct bt_conn *bt_conn_add_le(const bt_addr_le_t *peer)
|
|
||||||
{
|
|
||||||
struct bt_conn *conn = conn_new();
|
|
||||||
|
|
||||||
if (!conn) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct bt_conn *bt_conn_ref(struct bt_conn *conn)
|
struct bt_conn *bt_conn_ref(struct bt_conn *conn)
|
||||||
{
|
{
|
||||||
atomic_inc(&conn->ref);
|
atomic_inc(&conn->ref);
|
||||||
|
@ -181,9 +170,9 @@ void on_ble_gap_connect_evt(const struct ble_gap_connect_evt *ev)
|
||||||
|
|
||||||
BT_DBG("handle %u", ev->conn_handle);
|
BT_DBG("handle %u", ev->conn_handle);
|
||||||
|
|
||||||
conn = bt_conn_add_le(&ev->peer_bda);
|
conn = conn_new();
|
||||||
if (!conn) {
|
if (!conn) {
|
||||||
BT_ERR("Unable to create conn");
|
BT_ERR("Unable to create new bt_conn object");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue