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:
Johan Hedberg 2016-02-09 19:11:00 +02:00 committed by Anas Nashif
commit 9c3fc8aa96

View file

@ -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;
}