From a79b3b6d9550bbca45340e221b4e342fbfe6c973 Mon Sep 17 00:00:00 2001 From: Chris Phoenix Date: Fri, 20 Jan 2017 13:46:36 -0800 Subject: [PATCH] bootctrl HAL uses "default" service name The getService() and registerAsService() methods of interface objects now have default parameters of "default" for the service name. HALs will not have to use any service name unless they want to register more than one service. Test: builds; verify HAL still works Bug: 33844934 Change-Id: I43f282ffedf18e4b0817b49fc4860ac39b127d04 --- boot/1.0/default/BootControl.cpp | 6 +++--- boot/1.0/default/service.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boot/1.0/default/BootControl.cpp b/boot/1.0/default/BootControl.cpp index 828da169ba..9a900767d7 100644 --- a/boot/1.0/default/BootControl.cpp +++ b/boot/1.0/default/BootControl.cpp @@ -93,14 +93,14 @@ Return BootControl::getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) { } -IBootControl* HIDL_FETCH_IBootControl(const char* hal) { +IBootControl* HIDL_FETCH_IBootControl(const char* /* hal */) { int ret = 0; boot_control_module_t* module = NULL; hw_module_t **hwm = reinterpret_cast(&module); - ret = hw_get_module(hal, const_cast(hwm)); + ret = hw_get_module(BOOT_CONTROL_HARDWARE_MODULE_ID, const_cast(hwm)); if (ret) { - ALOGE("hw_get_module %s failed: %d", hal, ret); + ALOGE("hw_get_module %s failed: %d", BOOT_CONTROL_HARDWARE_MODULE_ID, ret); return nullptr; } module->init(module); diff --git a/boot/1.0/default/service.cpp b/boot/1.0/default/service.cpp index 0dc56bf1b6..f3996efe9c 100644 --- a/boot/1.0/default/service.cpp +++ b/boot/1.0/default/service.cpp @@ -22,5 +22,5 @@ using ::android::hardware::boot::V1_0::IBootControl; using android::hardware::defaultPassthroughServiceImplementation; int main (int /* argc */, char * /* argv */ []) { - return defaultPassthroughServiceImplementation("bootctrl"); + return defaultPassthroughServiceImplementation(); }