diff options
author | Steve Kondik <shade@chemlab.org> | 2013-02-06 11:39:51 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-02-06 11:39:51 -0800 |
commit | bc0f99a540d75e8f5051fffeea1f27bff11e1eb4 (patch) | |
tree | f9a33da1a25a88e2cdfaecbf317225063cd33d83 /src | |
parent | dd55580a6f3d72175f0cb78c9fc4fac59cf9be09 (diff) | |
download | external_libnfc-nxp-bc0f99a540d75e8f5051fffeea1f27bff11e1eb4.zip external_libnfc-nxp-bc0f99a540d75e8f5051fffeea1f27bff11e1eb4.tar.gz external_libnfc-nxp-bc0f99a540d75e8f5051fffeea1f27bff11e1eb4.tar.bz2 |
libnfc-nxp: Add alternate firmware path
* Check in /system/lib for firmware as well, so we can be bug-for-bug
compatible with OEMs.
Change-Id: Iea350c3d0a58a1f6012c2a088f8ba6fed4b10365
Diffstat (limited to 'src')
-rwxr-xr-x | src/phHal4Nfc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/phHal4Nfc.c b/src/phHal4Nfc.c index b4c1d45..f40ed9b 100755 --- a/src/phHal4Nfc.c +++ b/src/phHal4Nfc.c @@ -307,6 +307,7 @@ phHal4Nfc_Configure_Layers( #include <dlfcn.h> #define FW_PATH "/system/vendor/firmware/libpn544_fw.so" +#define FW_PATH_2 "/system/lib/libpn544_fw.so" const unsigned char *nxp_nfc_full_version = NULL; const unsigned char *nxp_nfc_fw = NULL; @@ -316,8 +317,11 @@ int dlopen_firmware() { void *handle = dlopen(FW_PATH, RTLD_NOW); if (handle == NULL) { - ALOGE("Could not open %s", FW_PATH); - return -1; + handle = dlopen(FW_PATH_2, RTLD_NOW); + if (handle == NULL) { + ALOGE("Could not open %s or %s", FW_PATH, FW_PATH_2); + return -1; + } } p = dlsym(handle, "nxp_nfc_full_version"); |