summaryrefslogtreecommitdiffstats
path: root/hci
diff options
context:
space:
mode:
authorMatthew Xie <mattx@google.com>2012-07-20 16:21:26 -0700
committerMatthew Xie <mattx@google.com>2012-07-20 16:21:26 -0700
commit380218c08339039ea1130e7ec17d63f6182a91a7 (patch)
tree4155f8d8c4b54854c440525bd192c8bd2d649b4c /hci
parentd9601d492ace3afcd69c19244eab8ec9c56ff160 (diff)
downloadexternal_bluetooth_bluedroid-380218c08339039ea1130e7ec17d63f6182a91a7.zip
external_bluetooth_bluedroid-380218c08339039ea1130e7ec17d63f6182a91a7.tar.gz
external_bluetooth_bluedroid-380218c08339039ea1130e7ec17d63f6182a91a7.tar.bz2
Get the vendor interface as a structure pointer instead of function
We donnot need the extra function to return the interface. bug 6853945 Change-Id: I693aa9f068a64ee5a5e9bc5ff3cc82ecf59d5de1
Diffstat (limited to 'hci')
-rw-r--r--hci/src/bt_hw.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/hci/src/bt_hw.c b/hci/src/bt_hw.c
index 4878260..414ee60 100644
--- a/hci/src/bt_hw.c
+++ b/hci/src/bt_hw.c
@@ -238,7 +238,6 @@ static const bt_vendor_callbacks_t vnd_callbacks = {
******************************************************************************/
void init_vnd_if(unsigned char *local_bdaddr)
{
- bt_vendor_interface_t (*bt_vendor_get_interface_func)(void);
void *dlhandle;
dlhandle = dlopen("libbt-vendor.so", RTLD_NOW);
@@ -248,20 +247,13 @@ void init_vnd_if(unsigned char *local_bdaddr)
return;
}
- bt_vendor_get_interface_func = dlsym(dlhandle, "bt_vendor_get_interface");
- if (!bt_vendor_get_interface_func)
+ bt_vnd_if = (bt_vendor_interface_t *) dlsym(dlhandle, "BLUETOOTH_VENDOR_LIB_INTERFACE");
+ if (!bt_vnd_if)
{
- ALOGE("!!! Failed to get bt_vendor_get_interface !!!");
+ ALOGE("!!! Failed to get bt vendor interface !!!");
return;
}
- if ((bt_vnd_if=(bt_vendor_interface_t *) bt_vendor_get_interface_func)!=NULL)
- {
- bt_vnd_if->init(&vnd_callbacks, local_bdaddr);
- }
- else
- {
- ALOGE("!!! Failed to get BtVendorInterface !!!");
- }
+ bt_vnd_if->init(&vnd_callbacks, local_bdaddr);
}