Commit 188c223c authored by Eric Laurent's avatar Eric Laurent
Browse files

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
parent fcc446f4
......@@ -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",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment