blob: ad3e2f1f95e53e251dbb39fd0bdfdf70cee3f0e6 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include "host_device.h"
extern "C" zx_status_t bthost_bind(void* ctx, zx_device_t* device) {
auto dev = std::make_unique<bthost::HostDevice>(device);
zx_status_t status = dev->Bind();
if (status == ZX_OK) {
// devmgr is now in charge of the memory for |dev|.
dev.release();
}
return status;
}