From ce2e6569dcb2d68149cb6c898262f628c28e47ad Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Thu, 12 Jan 2017 11:37:25 +0100 Subject: [PATCH] Load legacy NFC libhardware HAL by correct name. Use NFC_NCI_HARDWARE_MODULE_ID, which maps to "nfc_nci", and is correct for the PN54x HAL (which is the only remaining HAL implementation in use). Test: NFC works Change-Id: Ida810ec990ddb4f71756225fffb3fc2757e76374 --- nfc/1.0/default/Nfc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp index 075960541a..9d05fc2791 100644 --- a/nfc/1.0/default/Nfc.cpp +++ b/nfc/1.0/default/Nfc.cpp @@ -51,21 +51,21 @@ Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) { } -INfc* HIDL_FETCH_INfc(const char *hal) { +INfc* HIDL_FETCH_INfc(const char * /*name*/) { nfc_nci_device_t* nfc_device; int ret = 0; const hw_module_t* hw_module = NULL; - ret = hw_get_module (hal, &hw_module); + ret = hw_get_module (NFC_NCI_HARDWARE_MODULE_ID, &hw_module); if (ret == 0) { ret = nfc_nci_open (hw_module, &nfc_device); if (ret != 0) { - ALOGE ("nfc_nci_open %s failed: %d", hal, ret); + ALOGE ("nfc_nci_open failed: %d", ret); } } else - ALOGE ("hw_get_module %s failed: %d", hal, ret); + ALOGE ("hw_get_module failed: %d", ret); if (ret == 0) { return new Nfc(nfc_device);