From 9c3fc8aa9668f4424a64c63eeadbb7d297724afa Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 9 Feb 2016 19:11:00 +0200 Subject: [PATCH] drivers/nble: Remove unnecessary bt_conn_add_le function Change-Id: I99221b0b62219d59a076e8d228c4478571714e7a Signed-off-by: Johan Hedberg --- drivers/nble/conn.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/nble/conn.c b/drivers/nble/conn.c index fabbd9e520a..acbf7f945a8 100644 --- a/drivers/nble/conn.c +++ b/drivers/nble/conn.c @@ -51,17 +51,6 @@ static struct bt_conn *conn_new(void) 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) { 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); - conn = bt_conn_add_le(&ev->peer_bda); + conn = conn_new(); if (!conn) { - BT_ERR("Unable to create conn"); + BT_ERR("Unable to create new bt_conn object"); return; }