summaryrefslogtreecommitdiffstats
path: root/hardware.c
diff options
context:
space:
mode:
authorXpLoDWilD <xplodgui@gmail.com>2012-07-16 21:49:38 +0200
committerXpLoDWilD <xplodgui@gmail.com>2012-07-16 21:49:38 +0200
commit8985ce7994f8b85f15ce7507b8ccdf244911b5f9 (patch)
tree16535e461fea950558b52b76dccf47c33ed500b6 /hardware.c
parent34afb68c0cd1de315f0250f6a95b9dba234133ae (diff)
downloadhardware_libhardware-8985ce7994f8b85f15ce7507b8ccdf244911b5f9.zip
hardware_libhardware-8985ce7994f8b85f15ce7507b8ccdf244911b5f9.tar.gz
hardware_libhardware-8985ce7994f8b85f15ce7507b8ccdf244911b5f9.tar.bz2
hardware: Add an ifdef to disable id match check
When wrapping HAL modules (for example camera wrapping vendor-camera), this match check prevents vendor-camera to be loaded because its original name is camera and not vendor-camera. Change-Id: If79a941b54d83610638041440db907ae593b2e91
Diffstat (limited to 'hardware.c')
-rw-r--r--hardware.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hardware.c b/hardware.c
index 1f831cb..4c58e38 100644
--- a/hardware.c
+++ b/hardware.c
@@ -89,11 +89,13 @@ static int load(const char *id,
}
/* Check that the id matches */
+#ifndef DISABLE_HW_ID_MATCH_CHECK
if (strcmp(id, hmi->id) != 0) {
ALOGE("load: id=%s != hmi->id=%s", id, hmi->id);
status = -EINVAL;
goto done;
}
+#endif /* DISABLE_HW_ID_MATCH_CHECK */
hmi->dso = handle;