summaryrefslogtreecommitdiffstats
path: root/hardware.c
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-05-27 15:41:57 -0700
committerEric Laurent <elaurent@google.com>2011-05-27 15:46:27 -0700
commit188c223c7d0b53ed49c00d0828ef79890ec3052e (patch)
treebd3974bb0b9ce342ea8b51befc569b158622adb9 /hardware.c
parentfcc446f42ca5aa8bf81b55319cbd351614558a53 (diff)
downloadhardware_libhardware-188c223c7d0b53ed49c00d0828ef79890ec3052e.tar.gz
hardware_libhardware-188c223c7d0b53ed49c00d0828ef79890ec3052e.tar.bz2
hardware_libhardware-188c223c7d0b53ed49c00d0828ef79890ec3052e.zip
Fix hw module lookup order.
Make sure hw_get_module_by_class() first scans /vendor/lib/hw and then /system/lib/hw so that vendor specific modules override default ones. Change-Id: Iaec61c3b4bb6fde202acb4412aaec3b318cc1cbd
Diffstat (limited to 'hardware.c')
-rw-r--r--hardware.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hardware.c b/hardware.c
index 2559237..4d5f8fe 100644
--- a/hardware.c
+++ b/hardware.c
@@ -146,11 +146,11 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
continue;
}
snprintf(path, sizeof(path), "%s/%s.%s.so",
- HAL_LIBRARY_PATH1, name, prop);
+ HAL_LIBRARY_PATH2, name, prop);
if (access(path, R_OK) == 0) break;
snprintf(path, sizeof(path), "%s/%s.%s.so",
- HAL_LIBRARY_PATH2, name, prop);
+ HAL_LIBRARY_PATH1, name, prop);
if (access(path, R_OK) == 0) break;
} else {
snprintf(path, sizeof(path), "%s/%s.default.so",