diff options
author | Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com> | 2014-03-13 13:58:46 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-03-14 13:34:16 +0100 |
commit | 2bb8f57c986aa005a005a797730f32f4dfab4f48 (patch) | |
tree | 82e994d43216a26901fe9bb2c9eb48ae36c02421 /android/hal-health.c | |
parent | 840dcd6868caf11871ce4d7cfa147e02f67847f7 (diff) | |
download | bluez-2bb8f57c986aa005a005a797730f32f4dfab4f48.tar.gz |
android/hal-health: Add HDP .cleanup method
Diffstat (limited to 'android/hal-health.c')
-rw-r--r-- | android/hal-health.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/android/hal-health.c b/android/hal-health.c index d099ae23c..918fb695d 100644 --- a/android/hal-health.c +++ b/android/hal-health.c @@ -67,6 +67,25 @@ static bt_status_t init(bthl_callbacks_t *callbacks) return ret; } +static void cleanup(void) +{ + struct hal_cmd_unregister_module cmd; + + DBG(""); + + if (!interface_ready()) + return; + + cbacks = NULL; + + cmd.service_id = HAL_SERVICE_ID_HEALTH; + + hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE, + sizeof(cmd), &cmd, 0, NULL, NULL); + + hal_ipc_unregister(HAL_SERVICE_ID_HEALTH); +} + static bthl_interface_t health_if = { .size = sizeof(health_if), .init = init, @@ -74,7 +93,7 @@ static bthl_interface_t health_if = { .unregister_application = NULL, .connect_channel = NULL, .destroy_channel = NULL, - .cleanup = NULL + .cleanup = cleanup }; bthl_interface_t *bt_get_health_interface(void) |